Handle errors when sending mail
All checks were successful
Build & push Docker image / publish (push) Successful in 34s
All checks were successful
Build & push Docker image / publish (push) Successful in 34s
This commit is contained in:
@@ -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.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user