Error feedback with `createMutation` in `Solid`
I have the following situation:
When calling the API with erroneous data, I get the following response with the status
422:
Because it is not a network error, fetch treats a 422 response as a success. I would like to catch this and trigger a Solid Query error with the actual response from the API to give user feedbacks.2 Replies
rival-blackOP•2y ago
This is a first attempt. It works and I can access the errors via
mutation.errors, but it looks dirty:
Any suggestions how I can improve that? How do you handle it?
anyone?
I guess not 😅 Will have to wait the release of the online course