Improve error logging

This commit is contained in:
Thomas Sileo 2018-07-22 12:25:56 +02:00
parent dbabbfc55d
commit f92a6ea3dc

10
app.py
View file

@ -449,6 +449,16 @@ def handle_activitypub_error(error):
return response return response
@app.errorhandler(Exception)
def handle_other_error(error):
logger.error(
f"caught error {error!r}, {traceback.format_tb(error.__traceback__)}"
)
response = flask_jsonify({})
response.status_code = 500
return response
# App routes # App routes
ROBOTS_TXT = """User-agent: * ROBOTS_TXT = """User-agent: *