chore: surface SMTP error message to user on filing failure
This commit is contained in:
parent
290f803996
commit
44309dc189
1 changed files with 1 additions and 1 deletions
|
|
@ -167,7 +167,7 @@ func (h *FileHandler) FileEvent(w http.ResponseWriter, r *http.Request) {
|
||||||
if err := h.EmailSender.SendReport(to, subject, body, attachments); err != nil {
|
if err := h.EmailSender.SendReport(to, subject, body, attachments); err != nil {
|
||||||
log.Printf("ERROR [%s] handlers: FileEvent: SendReport(%s): %v",
|
log.Printf("ERROR [%s] handlers: FileEvent: SendReport(%s): %v",
|
||||||
time.Now().Format(time.RFC3339), to, err)
|
time.Now().Format(time.RFC3339), to, err)
|
||||||
renderFileError(w, "Failed to send report email. Please check the recipient address and try again.")
|
renderFileError(w, "Failed to send report: "+err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue