We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52419c7 commit 6695fefCopy full SHA for 6695fef
.scripts/utils.ts
@@ -6,7 +6,7 @@ import * as streams from "@std/streams";
6
*/
7
export async function downloadString(url: string): Promise<string> {
8
const response = await fetch(url);
9
- if (!response.body) {
+ if (response.status >= 400 || !response.body) {
10
throw new Error(`Failed to read ${url}`);
11
}
12
//const reader = streams.readerFromStreamReader(response.body.getReader());
0 commit comments