feat(python): catch all exceptions thrown through fastapi route paths
This commit does quite a bit:
- Catches unhandled exceptions raised in the route handler and produces a 500 Internal Server Error Arch-themed response.
- Each unhandled exception causes a notification to be sent to new
notifications.postmasteremail with a "Traceback ID." - Traceback ID is logged to the server along with the traceback which
caused the 500:
docker-compose logs fastapi | grep '<traceback_id>' - If
options.tracebackis set to1, traceback is displayed in the new 500.html template.
Signed-off-by: Kevin Morris kevr@0cost.org
When an exception is raised an unhandled
Email sent to notifications.postmaster
Traceback ID: c903574
Location: https://localhost:8444
Version: v5.0.0
Datetime: 2022-01-10 04:48 UTC
[1] https://localhost:8444
Edited by Kevin Morris
