-
-
Notifications
You must be signed in to change notification settings - Fork 967
Open
Description
Describe the bug
- Node.js version:
v20.13.0
- OS & version: IRRELEVANT
- Got Package Version:
14.4.2
I have this simple script:
import got from "got";
await got("https://google.com", { signal: AbortSignal.timeout(1) }).catch((error) => console.log(error.name));
Obviously it times out immediately.
Actual behavior
The log is AbortError
...
Expected behavior
Should be TimeoutError
. When I do:
await fetch("https://google.com", { signal: AbortSignal.timeout(1) }).catch((error) =>
console.log(error.name),
);
It prints TimeoutError
...
- I have read the documentation.
- I have tried my code with the latest version of Node.js and Got.
Metadata
Metadata
Assignees
Labels
No labels