Skip to content

Standardize timeout error message in composeSignals to match adapters #7080

@arvinder004

Description

@arvinder004

Describe the bug

The timeout error message emitted by composeSignals differs from xhr/http adapters. This causes inconsistency in error messaging across Axios.
Current in composeSignals: “timeout of {timeout}ms exceeded” after fix (previously “timeout {timeout} of ms exceeded”).
Matches xhr and http adapters which already use “timeout of {timeout}ms exceeded”.

Before the fix, composeSignals produced a grammatically inconsistent string: “timeout {timeout} of ms exceeded”.

To Reproduce

Compose a signal with a timeout and listen for abort:

Code snippet

const signal = composeSignals([], 100);
signal.addEventListener('abort', () => console.log(String(signal.reason)));

Expected behavior

All Axios pathways (helpers and adapters) should use the same timeout message: “timeout of {timeout}ms exceeded”.

Axios Version

No response

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

No response

OS

No response

Additional Library Versions

Additional context/Screenshots

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