1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-29 22:01:14 +03:00

Better log email errors

This commit is contained in:
Quentin Gliech
2022-12-14 16:15:55 +01:00
parent 9a39bf3f09
commit 829e503467
3 changed files with 23 additions and 1 deletions

View File

@ -90,6 +90,17 @@ impl Mailer {
/// # Errors
///
/// Will return `Err` if the email failed rendering or failed sending
#[tracing::instrument(
skip_all,
fields(
email.to = %to,
email.from = %self.from,
user.id = %context.user().id,
user_email_verification.id = %context.verification().id,
user_email_verification.code = context.verification().code,
),
err,
)]
pub async fn send_verification_email(
&self,
to: Mailbox,

View File

@ -147,7 +147,6 @@ impl AsyncTransport for Transport {
match self.inner.as_ref() {
TransportInner::Blackhole => {
tracing::warn!(
?envelope,
"An email was supposed to be sent but no email backend is configured"
);
}