diff options
| author | altaf-creator <dev@altafcreator.com> | 2026-06-26 12:06:38 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2026-06-26 12:06:38 +0800 |
| commit | 3abcae19fefd11bbfba6cbf696b342ea72da6992 (patch) | |
| tree | 37fe730ff6b1475ea24eb0f04df200ef923461c7 /main.py | |
| parent | 1b14996290f228a329d83c164e50c27364cc0a22 (diff) | |
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -36,10 +36,13 @@ class TurnstileTokenData(BaseModel): @app.exception_handler(fastapi.HTTPException) def exception_handling(request: fastapi.Request, exception: fastapi.HTTPException): + print("EXCEPTION:", exception) if exception.status_code == 404: return fastapi.responses.FileResponse("./www/404.html", status_code=404) elif exception.status_code == 209: return fastapi.responses.FileResponse("./www/209.html", status_code=209) + elif exception.status_code == 500: + return fastapi.responses.FileResponse("./www/500.html", status_code=500) @app.post("/api/email/") |
