Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vue axios Uncaught (in promise) Cancel

I see an error message saying "Uncaught (in promise) Cancel" even though the I used catch function to handle exceptions. My code looks like this:

this.http.get(params, { cancelToken }).catch(...)

I have the catch part, why do I still see the error?

like image 821
user2626972 Avatar asked Jan 24 '26 20:01

user2626972


1 Answers

axios's cancelToken is deprecated. Try using AbortController: https://axios-http.com/docs/cancellation

like image 175
Дмитрий Чиж Avatar answered Jan 27 '26 11:01

Дмитрий Чиж



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!