mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-17 12:42:16 +01:00
fixing wrong status code if alreay echo http error
This commit is contained in:
@@ -111,6 +111,8 @@ func doErr(ctx context.Context, err error) error {
|
|||||||
// if it's an error from echo
|
// if it's an error from echo
|
||||||
// like 404 not found and so on.
|
// like 404 not found and so on.
|
||||||
if echoHTTPErr, ok := err.(*echo.HTTPError); ok {
|
if echoHTTPErr, ok := err.(*echo.HTTPError); ok {
|
||||||
|
// required to have a correct status code.
|
||||||
|
ctx.Error(echoHTTPErr)
|
||||||
return echoHTTPErr
|
return echoHTTPErr
|
||||||
}
|
}
|
||||||
// we log the initial error before returning
|
// we log the initial error before returning
|
||||||
|
|||||||
Reference in New Issue
Block a user