-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Better error handling for local
provider
#952
Comments
I don't think there's a guide on how to handle errors produced by our module. I can see the importance of it, however, support for errors is not there yet. What information would you like to get out of the error? I am slowly starting to introduce typed errors to our module, so your input will be valuable |
Similar: #933 |
local
provider
The issue here is that when I submit my login form with an invalid username using the signIn() method, the external API responds with a 401 (Unauthorised). Unless I wrap the call in a try/catch and set the error in my form based on what comes back in the response as above, the page gives me no feedback as to what happened. So I guess the question is, is my code above the correct way of going about this? Or should I be doing it some other way? |
It does look correct |
Describe the feature
There is no documentation on how to handle errors from external APIs when signing in using the local provider.
How would you implement this?
The only way I've managed to implement this is to use the following code. I'm not sure if there's any other way.
Additional information
Provider
The text was updated successfully, but these errors were encountered: