Add a generic error handler that returns the application's default media type #1507
Labels
bug
enhancement
needs contributor
Comment on this issue if you'd like to volunteer to work on this. Thanks!
Milestone
If a generic Python exception is raised while running in gunicorn. The user will see an HTML Internal Server Error even though the default media type is
application/json
. This is due to the exception getting raised to the WSGI server which is defaulting the output. We should gracefully handle this with the default media type. According to the the WSGI spec applications shouldIn general, applications should try to trap their own, internal errors, and display a helpful message in the browser.
Tasks:
Add Recipe in docsAdd to documentation about adding error handling.The text was updated successfully, but these errors were encountered: