miLibris / flask-rest-jsonapi

Flask extension to build REST APIs around JSONAPI 1.0 specification.
http://flask-rest-jsonapi.readthedocs.io
MIT License
598 stars 153 forks source link

log exceptions on non-api fails #198

Open tsnowlan opened 3 years ago

tsnowlan commented 3 years ago

If not using debug mode, non-JsonApiExceptions are only returned to the requestor and not logged. This makes it difficult to detect when requests are failing and what is causing the exceptions.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.008%) to 90.424% when pulling 730094cb0dea5277d1ebab4d014f0eaab9cc53da on tsnowlan:frj-log-exceptions into a4ff3f4d5be78071f015efe003e976d31d4eba10 on miLibris:master.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.008%) to 90.424% when pulling 730094cb0dea5277d1ebab4d014f0eaab9cc53da on tsnowlan:frj-log-exceptions into a4ff3f4d5be78071f015efe003e976d31d4eba10 on miLibris:master.

mahenzon commented 3 years ago

Hi @tsnowlan! We maintain an upgraded fork Flask-COMBO-JSONAPI and already have such fix. Please take a look:

https://github.com/AdCombo/flask-combo-jsonapi/blob/b6303f3afda82eed8e2e5e3146f5d21e196231e4/flask_combo_jsonapi/decorators.py#L92-L94