-
Notifications
You must be signed in to change notification settings - Fork 30
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
Redirect on api error #6
Comments
One possible option, is to put any errors in the redux state. Then in your form component, you can check if there are any errors and display a message |
Would you mind to update the code for this? I don't know how... :( |
Sure. I'll code it up tomorrow |
I coded it in a separate branch: https://github.com/benawad/react-menu-monkey-client/tree/handle-login-error I added error handling for the login page. So if a user tries to login with an invalid email or password it will stop them. I recommend taking a look at this commit: c8cab6d It shows exactly what I changed. |
Thanks a lot! |
Hi!
When receiving an error from the api, like when the login is rejected, you just return {}, which isn't very helpfull.
How would you do it so that one could display an error to the client and rerender the form?
Cheers, Kai
The text was updated successfully, but these errors were encountered: