mirror of
https://github.com/wolfswolke/DeathGarden_API_Rebirth.git
synced 2026-07-05 10:46:34 -05:00
Added 404 handler
This commit is contained in:
parent
0b435a693e
commit
386ad9c6a7
|
|
@ -25,3 +25,28 @@ def inventory_unlock_special_items():
|
|||
return jsonify({"status": "error"})
|
||||
except Exception as e:
|
||||
logger.graylog_logger(level="error", handler="unknown_unlockSpecialItems", message=str(e))
|
||||
|
||||
|
||||
@app.errorhandler(404)
|
||||
def debug_404(e):
|
||||
print("##################################################################################")
|
||||
print("DEBUG 404")
|
||||
print("##################################################################################")
|
||||
print('HTTP Headers:')
|
||||
for header in request.headers:
|
||||
print(f'{header[0]}: {header[1]}')
|
||||
|
||||
print('Cookies:')
|
||||
for key, value in request.cookies.items():
|
||||
print(f'{key}: {value}')
|
||||
|
||||
print('Endpoint: ', request.endpoint)
|
||||
print('Path: ', request.path)
|
||||
print('Method: ', request.method)
|
||||
|
||||
if request.json:
|
||||
print('JSON Payload:')
|
||||
print(request.json)
|
||||
|
||||
print("##################################################################################")
|
||||
return jsonify({"status": "error", "code": 404})
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user