Skip to content

Uncaught email exceptions on user invite #3077

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

Merged
merged 1 commit into from
Jun 6, 2016
Merged

Conversation

amercader
Copy link
Member

@amercader amercader 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

Rather than returning a 500 error, return a ValidationError with the
SMTP error, and delete the pending user.
@amercader
Copy link
Member Author

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
Copy link
Contributor

k-nut commented Jun 3, 2016

@amercader looks good to me 👍

@brew brew merged commit a809747 into master Jun 6, 2016
amercader added a commit that referenced this pull request Jun 7, 2016
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 December 19, 2018 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants