i have configured global axios error handler. How can i prevent it from running in…
- User
i have configured global axios error handler. How can i prevent it from running in places where i would like to add custom error handling using axios.get(...).catch((ex)-> {...})?
- Assistant
- User
i have a javascript project with storybook and msw library. In my story i have: http.get("/endpoint", () => HttpResponse.error()). When i open it in the browser i see: The FetchEvent for "http://localhost:6006/endpoint" resulted in a network error response: the promise was resolved with an error response object. I do not get why promise was resolved with error response object. I would expect catch method being called.
- Assistant
- User
i have a javascript project with storybook and msw library. In my component i have axios.get("endpoint").then(processResponse).catch(processError) In my story i have: http.get("/endpoint", () => HttpResponse.error()). When i open it in the browser i see: The FetchEvent for "http://localhost:6006/endpoint" resulted in a network error response: the promise was resolved with an error response object (processResponse got called). I do not get why promise was resolved with error response object. I would expect catch method (processError) being called.
- Assistant
- User
answer above does not seem to work, there is no "rest" export in msw.
- Assistant