add better info for upload fail
This commit is contained in:
parent
7b10059b87
commit
906acde9bd
|
|
@ -9,6 +9,7 @@ async function uploadVideo(video: string) {
|
||||||
},
|
},
|
||||||
body: await Bun.file(video).arrayBuffer()
|
body: await Bun.file(video).arrayBuffer()
|
||||||
})
|
})
|
||||||
|
if (!uploaded.ok) throw new Error(`failed to upload video - ${uploaded.status} (${uploaded.statusText})`)
|
||||||
return uploaded.url.replace(keys.endpoint, 'https://s4.archive.party')
|
return uploaded.url.replace(keys.endpoint, 'https://s4.archive.party')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue