types demands we handle null case
This commit is contained in:
parent
3422b3e963
commit
baac38f888
|
@ -35,3 +35,4 @@ content.log
|
|||
cloudflared.exe
|
||||
public/assets/
|
||||
access.log
|
||||
debugLogs/
|
||||
|
|
|
@ -5274,7 +5274,7 @@ app.post('/asset_download', jsonParser, async (request, response) => {
|
|||
try {
|
||||
// Download to temp
|
||||
const res = await fetch(url);
|
||||
if (!res.ok) {
|
||||
if (!res.ok || res.body === null) {
|
||||
throw new Error(`Unexpected response ${res.statusText}`);
|
||||
}
|
||||
const destination = path.resolve(temp_path);
|
||||
|
|
Loading…
Reference in New Issue