mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 13:14:28 +00:00
More logging
This commit is contained in:
parent
13cee5dbae
commit
4877e955d0
1 changed files with 2 additions and 2 deletions
4
app.py
4
app.py
|
@ -404,7 +404,7 @@ def is_api_request():
|
|||
|
||||
@app.errorhandler(ValueError)
|
||||
def handle_value_error(error):
|
||||
logger.error(f"caught value error: {error!r}")
|
||||
logger.error(f"caught value error: {error!r}, {error.__traceback__}")
|
||||
response = flask_jsonify(message=error.args[0])
|
||||
response.status_code = 400
|
||||
return response
|
||||
|
@ -412,7 +412,7 @@ def handle_value_error(error):
|
|||
|
||||
@app.errorhandler(Error)
|
||||
def handle_activitypub_error(error):
|
||||
logger.error(f"caught activitypub error {error!r}")
|
||||
logger.error(f"caught activitypub error {error!r}, {error.__traceback__}")
|
||||
response = flask_jsonify(error.to_dict())
|
||||
response.status_code = error.status_code
|
||||
return response
|
||||
|
|
Loading…
Reference in a new issue