Page MenuHomePhabricator

[S] Log errors from email sending failures
Closed, ResolvedPublic

Description

We don't log errors when we send emails. Instead we throw a generic exception for the caller to the API.

We shouldn't expose internal details to the caller of the API, but we should log errors so that we can determine what the specific problem is.

Acceptance criteria

  • A failed email generates a corresponding log entry with error details, in the ReportIncident channel at the error level

Event Timeline

A failed email generates a corresponding log entry with error details, in the ReportIncident channel at the error level

Should this also include when the email is not sent due to the sender email / recipient email(s) not being defined? Currently these are logged as warnings.

A failed email generates a corresponding log entry with error details, in the ReportIncident channel at the error level

Should this also include when the email is not sent due to the sender email / recipient email(s) not being defined? Currently these are logged as warnings.

Yes, it would make sense to log at error level.

Dreamy_Jazz renamed this task from Log errors from email sending failures to [S] Log errors from email sending failures.Oct 30 2023, 4:43 PM

Change 969969 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/ReportIncident@master] Log when an email fails to send

https://gerrit.wikimedia.org/r/969969

Change 969969 merged by jenkins-bot:

[mediawiki/extensions/ReportIncident@master] Log when an email fails to send

https://gerrit.wikimedia.org/r/969969

Dreamy_Jazz added a subscriber: Djackson-ctr.

This cannot be QA'd on patchdemo or betawikis, as it relies on accessing the server logs.

I propose that considering the queue of QA tickets, this being a small change that made no user facing changes, and @Djackson-ctr not having a local environment, this can ticket can be skipped for QA. Leaving up to the QA team to determine. Can write local environment specific steps if you would prefer.

Yes I agree with you @Dreamy_Jazz that this can skip QA... I will push it to Done. Thank You, sir.