axios icon indicating copy to clipboard operation
axios copied to clipboard

How to ignore errors in interceptors after request cancellation

Open 2840365628 opened this issue 1 year ago • 1 comments

Describe the issue

When I cancel a request, I will enter the failure handling in the response interceptor. How to prevent throwing an exception here because I don't want to see the error of canceling the request printing in the console

Example Code

No response

Expected behavior

No response

Axios Version

No response

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

No response

OS

No response

Additional Library Versions

No response

Additional context/Screenshots

No response

2840365628 avatar Aug 01 '24 04:08 2840365628

https://stackoverflow.com/a/73635264 https://github.com/axios/axios/issues/293

I came across this. You can use interceptors to get and resolve it as you want.

yinstardev avatar Aug 17 '24 09:08 yinstardev

Same question. How can I keep some intercepter's already handled errors from bubbling? Make them fail silently

cangSDARM avatar Jan 10 '25 07:01 cangSDARM

closing as solution is provided

jasonsaayman avatar Sep 03 '25 19:09 jasonsaayman