Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle uncaught error sending email during registration and emit event. #84

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

mugwhump
Copy link
Contributor

Fixes #71
During user creation, an exception while sending the confirmation email would hang express. Wrap the email confirmation sending in try/catch. Emit event 'confirmation-email-error' if mail fails to send.

I also noted that the promise returned by createUser() is a promise-constructor anti-pattern, exceptions thrown by prepareNewUser() and insertNewUserDocument() might also hang Express. Though I'm not sure what those exceptions might be.

mugwhump and others added 2 commits February 23, 2024 18:32
…il would hang express. Wrap the email confirmation sending in try/catch. Emit event 'confirmation-email-error' if mail fails to send.
@mahnuh mahnuh merged commit fbb800f into perfood:master Jul 8, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unhandled SMTP error when sending confirmation email in createUser()
3 participants