diff --git a/src/utils.js b/src/utils.js index 12e07031fc..36e6f81656 100644 --- a/src/utils.js +++ b/src/utils.js @@ -78,6 +78,13 @@ const upload = async (opts) => { const response = await fetch(endpoint, { method: 'POST', headers, body }); const uri = await response.text(); + if (!uri) { + console.log(response); + throw new Error( + 'Malformed response; please report at https://github.com/iterative/cml/issues/443' + ); + } + return { uri, mime, size }; };