1
0

chore(web): always set internal error

(cherry picked from commit 5c56d07215a2a1fac63c565eac669fe8c1f19cbc)
This commit is contained in:
kolaente
2024-09-01 19:36:26 +02:00
parent a2ef74cade
commit 5049cbf236
6 changed files with 21 additions and 21 deletions

View File

@ -42,7 +42,7 @@ func HandleHTTPError(err error) *echo.HTTPError {
log.Error(err.Error())
if a, has := err.(web.HTTPErrorProcessor); has {
errDetails := a.HTTPError()
return echo.NewHTTPError(errDetails.HTTPCode, errDetails)
return echo.NewHTTPError(errDetails.HTTPCode, errDetails).SetInternal(err)
}
return echo.NewHTTPError(http.StatusInternalServerError)
return echo.NewHTTPError(http.StatusInternalServerError).SetInternal(err)
}