Skip to content

Uses ECONNABORTED for timeouts instead of ETIMEDOUT #1543

@jwbay

Description

@jwbay

Summary

Axios seems to set a code of ECONNABORTED when a request times out:

reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',

This makes it difficult to tell when a request actually timed out vs. being aborted in a different way:

reject(createError('Request aborted', config, 'ECONNABORTED', request));

Should ETIMEDOUT be used instead?

Context

  • axios version: 0.18.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions