From d7d44cb4e12dcb6e93377f41515717b85e00ebd3 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 25 Sep 2023 15:31:10 -0400 Subject: [PATCH] Catch subscription confirmation email errors --- email.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/email.go b/email.go index 551dd97..7638432 100644 --- a/email.go +++ b/email.go @@ -159,7 +159,11 @@ func handleCreateEmailSubscription(app *App, w http.ResponseWriter, r *http.Requ // Send confirmation email if needed if !confirmed { - sendSubConfirmEmail(app, c, ss.Email, es.ID, es.Token) + err = sendSubConfirmEmail(app, c, ss.Email, es.ID, es.Token) + if err != nil { + log.Error("Failed to send subscription confirmation email: %s", err) + return err + } } if ss.Web {