From 55bf66447efd63909678449bfbc569b2befbcf4e Mon Sep 17 00:00:00 2001 From: localhost Date: Sun, 22 Mar 2026 15:18:55 +0100 Subject: [PATCH] debugging for failed upload --- src/utils/upload.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/upload.ts b/src/utils/upload.ts index fe79c2b..75954ae 100644 --- a/src/utils/upload.ts +++ b/src/utils/upload.ts @@ -9,7 +9,7 @@ async function uploadVideo(video: string) { }, body: await Bun.file(video).arrayBuffer() }) - if (!uploaded.ok) throw new Error(`failed to upload video - ${uploaded.status} (${uploaded.statusText})`) + if (!uploaded.ok) throw new Error(`failed to upload video - ${uploaded.status} (${uploaded.statusText}) ${await uploaded.text()}`) return uploaded.url.replace(keys.endpoint, 'https://s5.archive.party') } @@ -33,6 +33,7 @@ async function uploadImage(id: string, url: string) { }, body: arrayBuffer }) + if (!uploaded.ok) throw new Error(`failed to upload video - ${uploaded.status} (${uploaded.statusText}) ${await uploaded.text()}`) return uploaded.url.replace(keys.endpoint, 'https://s5.archive.party') }