cloudapi/v2: detach HTTPErrorHandler from Server struct
This commit is contained in:
parent
135dd94de5
commit
39d2068d31
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue