Skip to content

Commit

Permalink
Add debugging message for #443
Browse files Browse the repository at this point in the history
This commit doesn't fix #443, but closes it until we can reproduce again the error.
  • Loading branch information
0x2b3bfa0 authored Mar 17, 2021
1 parent a5df22e commit 681370e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ const upload = async (opts) => {
const response = await fetch(endpoint, { method: 'POST', headers, body });
const uri = await response.text();

if (!response.ok || !uri) {
console.log({ response, uri });
throw new Error(
'Malformed response; please report at https://github.com/iterative/cml/issues/443'
);
}

return { uri, mime, size };
};

Expand Down

0 comments on commit 681370e

Please sign in to comment.