mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-28 05:11:02 +00:00
feat: add torbox error handling
This commit is contained in:
@@ -76,10 +76,10 @@ const startGameDownload = async (
|
|||||||
queued: true,
|
queued: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
await downloadsSublevel.put(gameKey, download);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await DownloadManager.startDownload(download);
|
await DownloadManager.startDownload(download).then(() => {
|
||||||
|
return downloadsSublevel.put(gameKey, download);
|
||||||
|
});
|
||||||
|
|
||||||
const updatedGame = await gamesSublevel.get(gameKey);
|
const updatedGame = await gamesSublevel.get(gameKey);
|
||||||
|
|
||||||
@@ -113,6 +113,10 @@ const startGameDownload = async (
|
|||||||
error: DownloadError.RealDebridAccountNotAuthorized,
|
error: DownloadError.RealDebridAccountNotAuthorized,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (downloader === Downloader.TorBox) {
|
||||||
|
return { ok: false, error: err.response?.data?.detail };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err instanceof Error) {
|
if (err instanceof Error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user