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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

…il would hang express. Wrap the email confirmation sending in try/catch. Emit event 'confirmation-email-error' if mail fails to send.
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()
1 participant