We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e83d75 commit d481729Copy full SHA for d481729
.changeset/mean-owls-exist.md
@@ -0,0 +1,5 @@
1
+---
2
+'@ai-sdk/provider-utils': patch
3
4
+
5
+fix (ai/provider-utils): generalize to Error (DomException not always available)
packages/provider-utils/src/is-abort-error.ts
@@ -1,6 +1,6 @@
-export function isAbortError(error: unknown): error is DOMException {
+export function isAbortError(error: unknown): error is Error {
return (
- error instanceof DOMException &&
+ error instanceof Error &&
(error.name === 'AbortError' || error.name === 'TimeoutError')
);
6
}
0 commit comments