chore: minor refactor of api module

This commit is contained in:
Julien Neuhart
2023-11-22 11:54:34 +01:00
parent 71eeca96ee
commit 3a28f4a0cb
20 changed files with 1228 additions and 904 deletions

View File

@@ -32,9 +32,9 @@ func ParseError(err error) (int, string) {
return http.StatusServiceUnavailable, http.StatusText(http.StatusServiceUnavailable)
}
var httpErr HTTPError
var httpErr HttpError
if errors.As(err, &httpErr) {
return httpErr.HTTPError()
return httpErr.HttpError()
}
// Default 500 status code.