From 5f1a48b1beff3f9248c29988bd943a1a6c006505 Mon Sep 17 00:00:00 2001 From: Harry Culpan Date: Sat, 4 Jul 2026 21:33:09 -0400 Subject: [PATCH] Log error when sendEmailHandler fails to send an email Send Reminder failures were silently swallowed, only surfacing in the HTTP response and never in the application log, unlike the GM notification email flows. Co-Authored-By: Claude Sonnet 5 --- cmd/web/sendemailhandler.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/web/sendemailhandler.go b/cmd/web/sendemailhandler.go index feec3d9..99f424a 100644 --- a/cmd/web/sendemailhandler.go +++ b/cmd/web/sendemailhandler.go @@ -2,6 +2,7 @@ package main import ( "context" + "log" "net/http" "strings" @@ -29,6 +30,7 @@ func sendEmailHandler(w http.ResponseWriter, r *http.Request) { // log.Default().Printf("got email: To: %s, From: %s, Subject: %q, Body: %q", to, from, subject, body) err := email.SendEmail(e) if err != nil { + log.Default().Printf("ERROR sending email: %s", err) http.Error(w, err.Error(), http.StatusInternalServerError) return }