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

timeout returns 'ECONNABORTED' instead of 'ETIMEDOUT'

Open Seb-C opened this issue 3 years ago • 0 comments

In Axios, it is possible to use this configuration to get explicit timeout errors:

transitional: {
    clarifyTimeoutError: true,
},

When doing that, I get the error code ETIMEDOUT instead of ECONNABORTED in Axios.

However, the timeout method of this adapter always returns ECONNABORTED, so it's not possible to properly test this scenario.

Seb-C avatar May 24 '22 01:05 Seb-C