Skip to content

Commit 372a0c4

Browse files
committed
Add reason string on abort() method in fetch util
1 parent f8f90fd commit 372a0c4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/serious-masks-serve.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Add reason string on when calling abort controller's `abort` method to avoid `AbortError: signal is aborted without reason` errors

packages/thirdweb/src/utils/fetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function getClientFetch(client: ThirdwebClient, ecosystem?: Ecosystem) {
7272
if (requestTimeoutMs) {
7373
controller = new AbortController();
7474
abortTimeout = setTimeout(() => {
75-
controller?.abort();
75+
controller?.abort("timeout");
7676
}, requestTimeoutMs);
7777
}
7878

0 commit comments

Comments
 (0)