Fixed not setting http code on error
This commit is contained in:
parent
d8f6a628db
commit
bbd90eb976
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ type CObject interface {
|
||||||
func HandleHTTPError(err error) *echo.HTTPError {
|
func HandleHTTPError(err error) *echo.HTTPError {
|
||||||
if a, has := err.(models.HTTPErrorProcessor); has {
|
if a, has := err.(models.HTTPErrorProcessor); has {
|
||||||
errDetails := a.HTTPError()
|
errDetails := a.HTTPError()
|
||||||
return echo.NewHTTPError(errDetails.Code, errDetails)
|
return echo.NewHTTPError(errDetails.HTTPCode, errDetails)
|
||||||
}
|
}
|
||||||
models.Log.Error(err.Error())
|
models.Log.Error(err.Error())
|
||||||
return echo.NewHTTPError(http.StatusInternalServerError)
|
return echo.NewHTTPError(http.StatusInternalServerError)
|
||||||
|
|
Loading…
Reference in a new issue