Skip to content

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

@powersjcb

Description

@powersjcb

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions