axios-mock-adapter icon indicating copy to clipboard operation
axios-mock-adapter copied to clipboard

error.response.headers undefined causes issues with current version of axios-retry

Open powersjcb opened this issue 6 months ago • 0 comments

https://github.com/softonic/axios-retry/pull/303/files

Undefined headers make axios-mock-adapter incompatible with axios-retry because it assumes that error.response.headers will not be undefined if error.response is present.

I'm trying to get this fixed here too, but opening this to track the bug incase anyone else runs into it.

TypeError: Cannot read properties of undefined (reading 'retry-after')
    at retryAfter (node_modules/axios-retry/dist/cjs/index.js:67:145)
    at exponentialDelay (node_modules/axios-retry/dist/cjs/index.js:85:45)

powersjcb avatar Apr 10 '25 16:04 powersjcb