When a request times out, got throws an error with a useless stack trace that doesn't have a single frame from my code.
RequestError: Timeout awaiting 'connect' for 200ms
at ClientRequest.<anonymous> (/app/node_modules/.pnpm/[email protected]/node_modules/got/dist/source/core/index.js:970:65)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:525:35)
at ClientRequest.emit (node:domain:489:12)
at origin.emit (/app/node_modules/.pnpm/@[email protected]/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
at TLSSocket.socketErrorListener (node:_http_client:502:9)
at TLSSocket.emit (node:events:513:28)
at TLSSocket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at Timeout.timeoutHandler [as _onTimeout] (/app/node_modules/.pnpm/[email protected]/node_modules/got/dist/source/core/utils/timed-out.js:36:25)
at listOnTimeout (node:internal/timers:571:11)
at process.processTimers (node:internal/timers:512:7)
A stack trace that gives me information on which request failed and where in my code I made the request.
await got("https://google.com");
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too