#3523: Standardize all failed email logger error messages - [RH] (#3937)

For failed email logger messages to be errors and have a standardized output
This commit is contained in:
Slim 2025-07-10 08:50:27 -07:00 committed by GitHub
parent 973b392923
commit 508bd30434
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 175 additions and 78 deletions

View file

@ -1018,8 +1018,14 @@ class Review(DomainRequestWizard):
context=context,
)
logger.info("A submission confirmation email was sent to ombdotgov@omb.eop.gov")
except EmailSendingError:
logger.warning("Failed to send confirmation email", exc_info=True)
except EmailSendingError as err:
logger.error(
"Failed to send OMB submission confirmation email:\n"
f" Subject template: omb_submission_confirmation_subject.txt\n"
f" To: ombdotgov@omb.eop.gov\n"
f" Error: {err}",
exc_info=True,
)
class Finished(DomainRequestWizard):