mirror of
https://github.com/wolfswolke/DeathGarden_API_Rebirth.git
synced 2026-09-13 03:26:05 -05:00
Added 404 Debug handler
This commit is contained in:
@@ -26,3 +26,28 @@ def inventory_unlock_special_items():
|
||||
return jsonify({"status": "error"})
|
||||
except Exception as e:
|
||||
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})
|
||||
|
||||
Reference in New Issue
Block a user