Replace plain fetch with something else
FabioRosado opened this issue · comments
Fábio Rosado commented
For now using fetch is working okay, but after testing the websocket token, I've noticed that once we get a forbidden request from the server all we get as an error message was: Failed to fetch
which is as useful as you would expect.
We probably should replace fetch with something more useful. The motivation behind that is that we have a way to keep errors in our state store and in the future we should present that to the user. So it would be good to get a lot more information why a request failed.
Useful things:
- status code
- message
- any extra data that we can add to the state