refactor: update cancel download confirmation text and enhance error handling in JsHttpDownloader

This commit is contained in:
Moyasee
2026-01-10 19:47:55 +02:00
parent 562e30eecf
commit da0ae54b60
4 changed files with 13 additions and 6 deletions

View File

@@ -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 {