flask-rest-jsonapi icon indicating copy to clipboard operation
flask-rest-jsonapi copied to clipboard

log exceptions on non-api fails

Open tsnowlan opened this issue 5 years ago • 3 comments
trafficstars

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.

tsnowlan avatar Nov 18 '20 08:11 tsnowlan

Coverage Status

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

coveralls avatar Nov 18 '20 08:11 coveralls

Coverage Status

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

coveralls avatar Nov 18 '20 08:11 coveralls

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

mahenzon avatar May 28 '21 09:05 mahenzon