mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 13:01:14 +00:00
Update file.ts
This commit is contained in:
parent
1327844736
commit
115120d066
@ -161,10 +161,10 @@ export async function httpDownload(options: string | HttpDownloadOptions): Promi
|
||||
}
|
||||
}
|
||||
const fetchRes = await fetch(url, { headers }).catch((err) => {
|
||||
if(err.cause){
|
||||
throw err.cause
|
||||
if (err.cause) {
|
||||
throw err.cause;
|
||||
}
|
||||
throw err
|
||||
throw err;
|
||||
});
|
||||
if (!fetchRes.ok) throw new Error(`下载文件失败: ${fetchRes.statusText}`);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user