Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw ETIMEDOUT on timeout when clarifyTimeoutError is true #352

Conversation

askielboe
Copy link
Contributor

Fix bug where timeout() and timeoutOnce() would throw ECONNABORTEDinstead of the correct ETIMEDOUT, when transitional.clarifyTimeoutError was set to true.

Relevant Axios documentation:

    // throw ETIMEDOUT error instead of generic ECONNABORTED on request timeouts
    clarifyTimeoutError: false,

Source https://github.com/axios/axios/blob/v1.x/README.md#request-config.

Closes #336.

@marcbachmann marcbachmann force-pushed the throw-ETIMEDOUT-when-clarifyTimeoutError-true branch from f75b1f8 to 3d4426f Compare April 12, 2023 09:44
@marcbachmann
Copy link
Collaborator

I've rebased. Basically this project doesn't have any optional chaining operator yet. Let's see whether tests succeed.

The migration to newer syntax should happen in a separate PR.
@marcbachmann marcbachmann merged commit 32074d6 into ctimmerm:master Apr 12, 2023
13 checks passed
@cure-tmk
Copy link

@marcbachmann Are there any plans for when this will be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

timeout returns 'ECONNABORTED' instead of 'ETIMEDOUT'
3 participants