infinitered / apisauce

Axios + standardized errors + request/response transforms.
MIT License
2.78k stars 184 forks source link

errors don't call catch #278

Open MohammedSaberMohammed opened 2 years ago

MohammedSaberMohammed commented 2 years ago

Hello everyone I'm using apisause to call an endpoint but this endpoint is not existed as following await Apis.home({ lang: 'ar' }) .then(res => console.log('res', res)) .catch(error => { throw new Error(error); });

but i got everytime this response from then not catch image

"apisauce": "^2.1.2",

Thanks in advance.

chakrihacker commented 2 years ago

You are receiving 404 response which is not an error