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

Catch error when User Creation Email fails at UserCreationService #5119

Conversation

MackenzieMolloy
Copy link

In the current 1.x release of Pterodactyl, when a Pterodactyl instance doesn't have emails configured or email details are invalid, administrative users are given a '500 Error' screen when creating a user rather than being shown the successfully created user's details page.

In this PR, I've simply caught the error and logged it. Opting not to display the error to the user, the user is then redirected to the successfully created user screen. There are many instances where emails aren't configured and the instance administrator is aware, so it makes sense not to hinder the user creation sequence.

I did consider returning an email sent successful state as part of the UserCreationService#handle, to then forward onto the user along with the new user object, however I was unsure if it would cause any major conflicts with forks or some project-specific software design choices I am unaware of.

I was thinking something similar to this if I were to return the error with the user object: https://hastebin.com/share/hamifisihe.php

Any feedback welcome. :)

@danny6167
Copy link
Member

I've never ran into this before.
Are you using sync as your QUEUE_DRIVER or something ?

@MackenzieMolloy
Copy link
Author

I've never ran into this before. Are you using sync as your QUEUE_DRIVER or something ?

Yes, I am.

@danny6167
Copy link
Member

Honestly, using sync for the queue driver is such an edge case as it's really only designed for local development and not something we recommend for production at all. I can't see us wanting to merge this.

If you want an easier way of making your config work, try setting the mail driver to array

@danny6167
Copy link
Member

Thank you for your submission, but I don't see us merging this.

@danny6167 danny6167 closed this Aug 7, 2024
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.

2 participants