fix: log confirmation link before email delivery

This commit is contained in:
bisco
2026-04-30 01:18:04 +02:00
parent ff9f9f2716
commit 8a47740049
2 changed files with 52 additions and 15 deletions

View File

@@ -50,11 +50,14 @@ def send_confirmation_email(*, reservation, raw_confirmation_token):
fail_silently=False,
)
except Exception:
_log_confirmation_link_for_local_debug(
reservation=reservation,
confirmation_link=confirmation_link,
reason="email send failure fallback",
)
if settings.LOG_RESERVATION_CONFIRMATION_URLS:
logger.warning(
"Failed to send confirmation email for reservation %s in local/debug mode.",
reservation.id,
exc_info=True,
)
return
logger.exception(
"Failed to send confirmation email for reservation %s.",
reservation.id,