Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/nodejs/nodejs.org
/ isTimeoutError
Function
isTimeoutError
apps/site/next.fetch.mjs:5–10 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
3
*/
4
5
const
isTimeoutError = e =>
6
e instanceof Error &&
7
typeof e.cause ===
'object'
&&
8
e.cause !== null &&
9
'code'
in e.cause &&
10
e.cause.code ===
'ETIMEDOUT'
;
11
12
const
sleep = ms =>
new
Promise(r => setTimeout(r, ms));
13
Callers
1
attemptFetch
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected