diff --git a/lib/network.js b/lib/network.js index 1f2f684..9bdcbd2 100644 --- a/lib/network.js +++ b/lib/network.js @@ -41,6 +41,7 @@ const httpApiCall = async (url, { method = 'POST', headers = {}, body }) => { return await fetch(url, options).then(async (res) => { const code = res.status; if (code === 200) return await res.json(); + await res.body.cancel(); const dest = `for ${method} ${url}`; throw new Error(`HTTP status code ${code} ${dest}`); });