Always log an error even if it was a http error
This commit is contained in:
parent
26386be9a9
commit
d85def955b
@ -35,10 +35,10 @@ type CObject interface {
|
||||
|
||||
// HandleHTTPError does what it says
|
||||
func HandleHTTPError(err error, ctx echo.Context) *echo.HTTPError {
|
||||
config.LoggingProvider.Error(err.Error())
|
||||
if a, has := err.(web.HTTPErrorProcessor); has {
|
||||
errDetails := a.HTTPError()
|
||||
return echo.NewHTTPError(errDetails.HTTPCode, errDetails)
|
||||
}
|
||||
config.LoggingProvider.Error(err.Error())
|
||||
return echo.NewHTTPError(http.StatusInternalServerError)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user