We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f476aa4 commit 70c93d5Copy full SHA for 70c93d5
script/ci/download.js
@@ -13,8 +13,14 @@ async function download() {
13
const [, user, repo] = url.match(/\/([a-z0-9_.-]+)\/([a-z0-9_.-]+)\.git$/i)
14
15
const res = await fetch(`https://api.github.com/repos/${user}/${repo}/releases/tags/v${version}`)
16
+
17
if (!res.ok) {
- throw new Error(`Github release v${version} not found (${res.status})`)
18
+ if (res.status == 404) {
19
+ throw new Error(`Github release v${version} not found (${res.status})`)
20
+ } else {
21
+ const body = await res.text()
22
+ throw new Error(`Github release v${version} not accessible (${res.status}): ${body}`)
23
+ }
24
}
25
26
const {assets} = await res.json()
0 commit comments