Skip to content

Commit

Permalink
More Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 19, 2023
1 parent 95fdc3a commit 70a5ead
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ingest-zip/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ async function fetcher(url, body) {
});

if (!res.ok) {
console.error('ERROR: Headers:', JSON.stringify(Object.fromEntries(res.headers)));

const texterr = await res.text();
let jsonerr;
try {
Expand All @@ -246,6 +248,7 @@ async function fetcher(url, body) {
throw new Error(texterr);
}

console.error('ERROR: Body:', JSON.stringify(jsonerr));
if (jsonerr.message) throw new Error(jsonerr.message);
throw new Error(texterr);
}
Expand Down

0 comments on commit 70a5ead

Please sign in to comment.