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

Uncaught email exceptions on user invite #3077

Merged
merged 1 commit into from Jun 6, 2016

Conversation

Projects
None yet
3 participants
@amercader
Copy link
Member

commented Jun 1, 2016

When inviting a user to a group or an organization, either via the UI or the user_invite API call if there was a problem sending the invite email the exception is not caught, resulting in a 500 error. Common exceptions include [Errno 111] Connection refused and MailerException: SMTPAuthenticationError(435, '4.7.8 Error: authentication failed:').

I think we should delete the pending user (which is already created at this point).

Error returned:

5mdnzcw

[#3077] Catch mailer exceptions on user invite
Rather than returning a 500 error, return a ValidationError with the
SMTP error, and delete the pending user.
@amercader

This comment has been minimized.

Copy link
Member Author

commented Jun 1, 2016

Frustratingly the members page will still list the deleted user that was just created even if the email wasn't send. This is because of #3078

@k-nut

This comment has been minimized.

Copy link
Contributor

commented Jun 3, 2016

@amercader looks good to me 👍

@brew brew merged commit a809747 into master Jun 6, 2016

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

amercader added a commit that referenced this pull request Jun 7, 2016

[#3077] Catch mailer exceptions on user invite
Rather than returning a 500 error, return a ValidationError with the
SMTP error, and delete the pending user.

@smotornyuk smotornyuk deleted the 3077-exceptions-user-invite branch Dec 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.