Open notpushkin opened 2 years ago
LGTM - I might try to refactor this to reject with an Error that has the .response
property attached (I assume that's what Axios is doing). The current .catch(Object)
trick likely has to go though.
@developit Sorry for bothering – any updates on this? :-)
Axios returns a custom object when request status is not OK (https://github.com/axios/axios/#handling-errors):
Redaxios on the other hand throws the response directly, as pointed out in comment https://github.com/developit/redaxios/issues/48#issuecomment-958745702.
The easiest fix would be just to wrap the response in an object, but for better compatibility we could add some other fields.