mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 13:14:28 +00:00
Improve error logging
This commit is contained in:
parent
dbabbfc55d
commit
f92a6ea3dc
1 changed files with 10 additions and 0 deletions
10
app.py
10
app.py
|
@ -449,6 +449,16 @@ def handle_activitypub_error(error):
|
|||
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
|
||||
|
||||
ROBOTS_TXT = """User-agent: *
|
||||
|
|
Loading…
Reference in a new issue