ECONNABORTED error when Axios request times out
0 reputation · 08 Aug 2026, 16:43 UTC
Problem: ECONNABORTED on timeout
When an Axios request exceeds the configured timeout value, the library rejects the promise with an error whose name is ECONNABORTED and a message indicating that the timeout was exceeded. The underlying implementation uses a JavaScript timer that, upon expiration, aborts the request via AbortController (browser) or the Node.js HTTP module.
A key uncertainty remains: does the timeout counter start immediately when the request is initiated, or does it begin only after the request has been fully transmitted to the network stack? This distinction matters for large payloads where the body may still be in the process of being sent when the timer fires.
Specific questions
- In a browser environment, does the Axios timeout timer start counting as soon as
axios.request()is called, or only after the request body has been queued for transmission? - When the timeout occurs before a response is received, is the
validateStatuscallback guaranteed to be bypassed, or can it still be invoked if the response arrives just after the timer fires? - Does the behavior differ between Node.js (using the
httpmodule) and modern browsers regarding the moment the abort signal is dispatched relative to the network stack?