inveniosoftware / flask-resources

REST APIs for Flask
https://flask-resources.readthedocs.io
MIT License
3 stars 21 forks source link

errors: add logging of exceptions when in debug #95

Closed lnielsen closed 3 years ago

lnielsen commented 3 years ago

This makes it a bit easier to understand what's going on for developers.

For instance the resource might catch a RequestError from Elasticsearch, which could be because of syntax error in the query string, but as well there could be something else wrong, but the exception is swallowed by the error handler, so you only get a 400 response. Without the exception it's hard for the developer to determine that RequestError might be too broad an exception.