Pārlūkot izejas kodu

debug: add detailed error reporting to contact form

unknown 2 dienas atpakaļ
vecāks
revīzija
a16dcab1cf
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  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)}")