cloudapi/v2: detach HTTPErrorHandler from Server struct

This commit is contained in:
Sanne Raymaekers 2024-06-25 12:12:10 +02:00
parent 135dd94de5
commit 39d2068d31
2 changed files with 2 additions and 2 deletions

View file

@ -275,7 +275,7 @@ func apiErrorFromEchoError(echoError *echo.HTTPError) ServiceErrorCode {
}
// Convert an echo error into an AOC compliant one so we send a correct json error response
func (s *Server) HTTPErrorHandler(echoError error, c echo.Context) {
func HTTPErrorHandler(echoError error, c echo.Context) {
doResponse := func(details interface{}, code ServiceErrorCode, c echo.Context, internal error) {
if !c.Response().Committed {
var err error