Skip to content

Commit 3607d45

Browse files
fix: log errors when host confirmation email fails
Replace `let _ =` with explicit error logging on send_host_notification in both confirm_booking and approve_booking_by_token handlers. This surfaces failures (e.g. email address parse errors) at info level instead of silently discarding them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ba5a90c commit 3607d45

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/web/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,9 @@ async fn confirm_booking(
14321432
.await;
14331433

14341434
// Also send host a confirmation email with ICS attachment
1435-
let _ = crate::email::send_host_notification(&smtp_config, &details).await;
1435+
if let Err(e) = crate::email::send_host_notification(&smtp_config, &details).await {
1436+
tracing::error!(error = %e, host_email = %details.host_email, "host confirmation email failed");
1437+
}
14361438
}
14371439

14381440
Redirect::to("/dashboard/bookings").into_response()
@@ -6904,7 +6906,9 @@ async fn approve_booking_by_token(
69046906
.await;
69056907

69066908
// Also send host a confirmation email with ICS attachment
6907-
let _ = crate::email::send_host_notification(&smtp_config, &details).await;
6909+
if let Err(e) = crate::email::send_host_notification(&smtp_config, &details).await {
6910+
tracing::error!(error = %e, host_email = %details.host_email, "host confirmation email failed");
6911+
}
69086912
}
69096913

69106914
let tmpl = match state.templates.get_template("booking_approved.html") {

0 commit comments

Comments
 (0)