summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2026-06-26 12:06:38 +0800
committeraltaf-creator <dev@altafcreator.com>2026-06-26 12:06:38 +0800
commit3abcae19fefd11bbfba6cbf696b342ea72da6992 (patch)
tree37fe730ff6b1475ea24eb0f04df200ef923461c7 /main.py
parent1b14996290f228a329d83c164e50c27364cc0a22 (diff)
major changes to /about/, event reflections, project reflections, video reflectionsHEADmaster
Diffstat (limited to 'main.py')
-rw-r--r--main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.py b/main.py
index 459f9a1..0a7eb2b 100644
--- a/main.py
+++ b/main.py
@@ -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/")