discussions-and-proposals
discussions-and-proposals copied to clipboard
Fetch generic error message
Introduction
For the past few days, we've been debugging an issue with our API calls, and this issue was made harder by the generic "TypeError: network request failed" message, which didn't give us much info to go off. I ended up making our own simple fetch to see what the actual error message was and from there it was very simple to debug the issue.
Details
Maybe there's a way to get better error messages from a fetch that I don't know of, but if there isn't I'd like to discuss change so that error message from the native side gets passed back to react.
Discussion points
- Is there a better way than already exists?
- Why does fetch currently return a generic error message?
- What would it take to change it?