Parcourir la source

debug: add detailed error reporting to contact form

unknown il y a 2 jours
Parent
commit
a16dcab1cf
1 fichiers modifiés avec 4 ajouts et 2 suppressions
  1. 4 2
      backend/routers/contact.py

+ 4 - 2
backend/routers/contact.py

@@ -48,5 +48,7 @@ async def submit_contact_form(
         return {"message": "Your message has been sent successfully."}
         
     except Exception as e:
-        print(f"Contact form error: {e}")
-        raise HTTPException(status_code=500, detail="Internal server error")
+        import traceback
+        print(f"CRITICAL Contact form error: {e}")
+        traceback.print_exc()
+        raise HTTPException(status_code=500, detail=f"Internal server error: {str(e)}")