Skip to content

Commit

Permalink
Add error logging to release job.
Browse files Browse the repository at this point in the history
  • Loading branch information
torreyatcitty committed Aug 20, 2024
1 parent 058089b commit 7e2e45e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ async function release(cid, url, signature) {
body: cid,
method: 'POST',
headers: {
'x-signature': signature
}
'x-signature': signature,
},
});
const json = await res.json();

try {
const json = await res.json();
} catch (error) {
console.error(`Response was not valid JSON: ${error}`);
}

if (json.cid) {
console.log(`Successfully released: ${json.cid}`);
Expand Down

0 comments on commit 7e2e45e

Please sign in to comment.