Handle errors when sending mail
All checks were successful
Build & push Docker image / publish (push) Successful in 34s

This commit is contained in:
estebanthi
2025-10-18 16:48:00 +02:00
parent 7d7470f01d
commit 08da066855

View File

@@ -122,9 +122,8 @@ async def contact(req: Request, data: ContactIn):
error_messages.append(f"webhook: {e}")
if not delivered:
# Fallback to log-only; still return OK to avoid leaking signals to bots
print("[WARN] Contact not delivered", {"errors": error_messages})
return ContactOut(ok=True, message="Thanks! Ill reply soon.")
return ContactOut(ok=False, message="Sorry, something went wrong. Please try again later.")
return ContactOut(ok=True, message="Thanks! Ill reply soon.")