Skip to content

Commit 5d5bdcb

Browse files
committed
fix
1 parent b76c8ef commit 5d5bdcb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmd/tasks/util/fetch-download-count.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ export async function fetchDownloadCount(name) {
55
await new Promise((resolve) => setTimeout(resolve, 10000));
66
return fetchDownloadCount(name);
77
}
8+
9+
if (response.status === 404) {
10+
return {
11+
downloads: 0
12+
}
13+
}
814

9-
if (response.status !== 200) {
15+
if (!response.ok) {
1016
throw new Error(`Fetching downloads count : ${response.statusText}`);
1117
}
1218

0 commit comments

Comments
 (0)