Closed lm-dlukmanov closed 5 months ago
would you try console.log(err.response.data)
?
@yutak23 Yes. And I see there additional data. But when I catch error it doesn't have such field response
I decided to use interceptor of axios and handle it on my side.
Using axios-retry in NestJs app like this:
After the last retry as expected I should get an error:
The point is - the error thrown after last retry does not include all the information of the root error. I only get this structure:
whereas the root error have a lot of additional data in error response, i.e.:
{status: 400, {"errors":[{"code":"118","message":"MY_SERVICE service required for tariff MY_TARIFF"}]}}
How can I get the whole error object not only some of the fields which are not very informative?