Skip to content

Commit a64eb26

Browse files
authoredMar 13, 2023
fix(fetch): remove undefined error cause (#2006)
We have checked on the line before that `isError` is falsy, so the cause is always set to `undefined`, which is not very useful.
1 parent f04f9fa commit a64eb26

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎lib/fetch/response.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,7 @@ function makeNetworkError (reason) {
348348
status: 0,
349349
error: isError
350350
? reason
351-
: new Error(reason ? String(reason) : reason, {
352-
cause: isError ? reason : undefined
353-
}),
351+
: new Error(reason ? String(reason) : reason),
354352
aborted: reason && reason.name === 'AbortError'
355353
})
356354
}

0 commit comments

Comments
 (0)
Please sign in to comment.