Improve Error Handling for Unregistered Account Sign-In
How are you running Flagsmith
- [X] Self Hosted with Docker
- [X] SaaS at flagsmith.com
- [ ] Self Hosted with Kubernetes
- [ ] Some other way (add details in description below)
Describe the bug
Currently, when a user attempts to sign in with an unregistered account, the application displays a generic "Server Error (500)" message in the toast notification. This error message is not user-friendly and does not provide helpful information to the user.
Steps To Reproduce
- Go to the sign-in page.
- Enter an invalid email and password (e.g.
foo/bar). - Submit the sign-in form.
Expected behavior
The application should display a toast notification with a clear and user-friendly error message, such as "Username provided is not a valid email."
Screenshots
@sumtzehern I am unable to reproduce this behaviour, please can you provide further steps to reproduce this.
This would happen when a user type in a Unregistered username, email would work fine.
Ok, thanks - I've updated the description of the issue with further clarifications regarding this behaviour. If you'd like to submit a PR for this, please feel free to do so. Otherwise, since this isn't a valid use case (we don't support non-email address usernames), this will likely not be prioritised.
Greetings, I am just starting with this project and wanna pick this issue. @matthewelwell , can you please assign this to me?
Hi @aliyan-hammad , sure - I have assigned it to you now.
Thanks!
Hi , @matthewelwell the above-mentioned error is not being produced locally. It is occurring on https://app.flagsmith.com/. Any guidance?
Hi , @matthewelwell the above-mentioned error is not being produced locally. It is occurring on https://app.flagsmith.com/. Any guidance?
Hi @aliyan-hammad! Apologies for the confusion here — the actual error is produced by our private code that is not available in this repo. We'll have to fix it on our own.
No worries @matthewelwell
I'm closing this as a duplicate of https://github.com/Flagsmith/flagsmith/issues/4951