Closed rstein closed 2 years ago
Thanks for this
What is the timeline for this fix? We are currently forced to implement workarounds in our tests.
Tests are failing, I can merge it as soon as they pass.
I might take a gander at fixing the tests tonight, if @rstein isn't around
Hi! I have changed the error creation to use the AxiosError.from
method. Using new AxiosError
seems to cause the stack
property to be missing on the error object. Tests are now working for me locally.
Thanks!
From v0.27.2 axios uses a constructor to create instances of AxiosError. (See https://github.com/axios/axios/pull/3645). This PR uses said constructor to create errors and falls back to the previous behavior for older versions if the constructor is not available. This also fixes #338