-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Adapter#ajax#catch doesn't give access to the server's response #3625
Comments
if I go into that |
@JKGisMe that's a really weird interface to access errors. It provides no means of mapping back to a user interaction or a resource in the client. Consider the following Attempting to save a model, i.e: a
|
Don't get me wrong, I'm not saying that it's ideal. More like a workaround if you really needed to find the errors. I can't even get my models' errors any other way. Apparently something in my relatively vanilla setup confuses ED. |
@JKGisMe that's no worries. That's the workaround I initially implemented. But I believe it really shouldn't be like that, |
@mariogintili sorry for the long overdue response 😔 These custom errors encapsulate all the information of the error, so checking if the thrown error is an If you need in your case the status and the payload because you do some custom logic with them, you can override Does that help? |
thanks for getting back @pangratz 🎯 |
How do you enable the extended errors? Setting |
@joelalejandro the |
Hello guys,
I have a custom request that I want to send using the adapter. Looks something like this
My server will reply with
422
and a payload with errors. When it doeshandleFailure
will be called however, the only argument yield into it is an$adapters$errors$$InvalidError
Which doesn't provide an interface to see the payload :( is there any other way of accessing it?The text was updated successfully, but these errors were encountered: