WIP: tests of api pkg

This commit is contained in:
Julien Neuhart
2019-07-09 22:22:22 +02:00
parent c7ecdcf625
commit 0c1e4e6888
8 changed files with 67 additions and 11 deletions

View File

@@ -18,6 +18,11 @@ func Error() echo.MiddlewareFunc {
// so far so good!
return nil
}
// if it's an error from echo
// like 404 not found and so on.
if echoHTTPErr, ok := err.(*echo.HTTPError); ok {
return echoHTTPErr
}
// we log the initial error before returning
// the HTTP error.
errOp := standarderror.Op(err)