We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
defaultErrorFormatters
defaultErrorFormatters is documented as
Default formatters will just return HTTP 400 status code with error message as response body.
but its implementation is
defaultErrorFormatters = ... notFoundErrorFormatter = const err404 err404 = ... errBody = ""
So, in case of error 404, the message is not present in the response body.
do serveWithContext api (errorFormatters :. EmptyContext) where errorFormatters = defaultErrorFormatters{notFoundErrorFormatter} notFoundErrorFormatter _ = ServerError { errHTTPCode = 404 , errReasonPhrase = "Not Found" , errBody = "404 Not Found" , errHeaders = [] }
Change defaultErrorFormatters.notFoundErrorFormatter to errBody.
defaultErrorFormatters.notFoundErrorFormatter
errBody
The text was updated successfully, but these errors were encountered:
No branches or pull requests
defaultErrorFormatters
is documented asbut its implementation is
So, in case of error 404, the message is not present in the response body.
Workaround
Proposed solution
Change
defaultErrorFormatters.notFoundErrorFormatter
toerrBody
.The text was updated successfully, but these errors were encountered: