From 08da06685583346c6667a0782f5694022c18079b Mon Sep 17 00:00:00 2001 From: estebanthi Date: Sat, 18 Oct 2025 16:48:00 +0200 Subject: [PATCH] Handle errors when sending mail --- app/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index d0c741e..30cefec 100644 --- a/app/main.py +++ b/app/main.py @@ -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! I’ll reply soon.") + return ContactOut(ok=False, message="Sorry, something went wrong. Please try again later.") return ContactOut(ok=True, message="Thanks! I’ll reply soon.")