Unusable in production due hardcoded status handling
Pyrolistical opened this issue · comments
Pyrolistical commented
Due to https://github.com/ksplatdev/AxleJS/blob/main/src/utils/handleStatus.ts#L6 users of this library are unable to have custom handling of error status codes.
bleart emini commented
How would you think it should be instead?
Pyrolistical commented
Checkout how Axios does it. it throws an error object with an optional response field if its an error that happened after the response was received https://github.com/axios/axios#handling-errors
bleart emini commented
Commit 65d3188 should fix this.
bleart emini commented
AxleJS Test on Codesandbox has the build from that commit.