Update main.py
Browse files
main.py
CHANGED
|
@@ -107,12 +107,14 @@ def _log_response(resp):
|
|
| 107 |
|
| 108 |
@app.errorhandler(Exception)
|
| 109 |
def _unhandled_exception(err):
|
| 110 |
-
|
| 111 |
-
|
|
|
|
|
|
|
|
|
|
| 112 |
return jsonify({
|
| 113 |
"status": "error",
|
| 114 |
"message": "Internal server error",
|
| 115 |
-
"requestId": getattr(g, "request_id", "-"),
|
| 116 |
}), 500
|
| 117 |
|
| 118 |
interventions_offered = {
|
|
|
|
| 107 |
|
| 108 |
@app.errorhandler(Exception)
|
| 109 |
def _unhandled_exception(err):
|
| 110 |
+
logger.exception(
|
| 111 |
+
"UNHANDLED id=%s path=%s",
|
| 112 |
+
getattr(g, "request_id", "-"),
|
| 113 |
+
request.path,
|
| 114 |
+
)
|
| 115 |
return jsonify({
|
| 116 |
"status": "error",
|
| 117 |
"message": "Internal server error",
|
|
|
|
| 118 |
}), 500
|
| 119 |
|
| 120 |
interventions_offered = {
|