From 05f40628b14a27b7491c7eaeae530ca9954a223d Mon Sep 17 00:00:00 2001 From: Nulo Date: Fri, 20 Jan 2023 00:09:27 -0300 Subject: [PATCH] uploadBlobs: don't fail wrongly on verification --- src/upload.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/upload.ts b/src/upload.ts index feabe7d..7a135ac 100644 --- a/src/upload.ts +++ b/src/upload.ts @@ -92,9 +92,10 @@ export default async function uploadBlobs( }, body: JSON.stringify(infos[index]), }); - throw new Error( - `Upload might have been unsuccessful, verification action yielded HTTP ${verificationResp.status}` - ); + if (!resp.ok) + throw new Error( + `Upload might have been unsuccessful, verification action yielded HTTP ${verificationResp.status}` + ); } }) );