Skip to content

Commit 57c792d

Browse files
authored
fix: Infer stack trace correctly (#64)
1 parent 1e380a8 commit 57c792d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/better-fetch/src/error.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ export class BetterFetchError extends Error {
77
super(statusText || status.toString(), {
88
cause: error,
99
});
10+
Error.captureStackTrace(this, this.constructor);
1011
}
1112
}

0 commit comments

Comments
 (0)