Skip to content

Commit c7f705c

Browse files
committed
fix(stream): response status check
1 parent 785deba commit c7f705c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/utils/stream.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export async function fetchStream(url, requestOptions = {}, options = {}) {
3737
headers,
3838
signal
3939
})
40-
if (!response.ok && response.status !== 206 && response.status !== 200) {
40+
if (!response.ok || (response.status !== 206 && response.status !== 200)) {
4141
throw new Error(`Fetch error: ${response.status}`)
4242
}
4343
return response

0 commit comments

Comments
 (0)