Skip to content

Commit

Permalink
fix: terminate context on error type
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Nov 11, 2021
1 parent e780b16 commit 3d2ce43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fetch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ function fetchFinale (fetchParams, response) {

// TODO (spec): The spec doesn't specify this but we need to
// terminate fetch if we have an error response.
if (response.status === 0) {
if (response.type === 'error') {
context.terminate({ reason: response.error })
}
}
Expand Down

0 comments on commit 3d2ce43

Please sign in to comment.