Don't delete files you create during research. If writing an error handler for a fetch response. You should do it like this: throw new Error(`Failed (${resp.status}): ${await resp.text()}`);