mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-21 01:53:57 +00:00
refactor: update cancel download confirmation text and enhance error handling in JsHttpDownloader
This commit is contained in:
@@ -258,7 +258,11 @@ export class JsHttpDownloader {
|
||||
}
|
||||
|
||||
private handleDownloadError(err: Error): void {
|
||||
if (err.name === "AbortError") {
|
||||
// Handle abort/cancellation errors - these are expected when user pauses/cancels
|
||||
if (
|
||||
err.name === "AbortError" ||
|
||||
(err as NodeJS.ErrnoException).code === "ERR_STREAM_PREMATURE_CLOSE"
|
||||
) {
|
||||
logger.log("[JsHttpDownloader] Download aborted");
|
||||
this.status = "paused";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user