Treat hosterNotAvailable as temporary error with retry
Move hosterNotAvailable from isPermanentLinkError to isTemporaryUnrestrictError — hoster being unavailable is usually transient (overload, maintenance) and should be retried with backoff instead of immediately failing as "Link ungültig". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4bdc95a055
commit
67fc3a8e1c
@ -302,7 +302,6 @@ function isFetchFailure(errorText: string): boolean {
|
|||||||
function isPermanentLinkError(errorText: string): boolean {
|
function isPermanentLinkError(errorText: string): boolean {
|
||||||
const text = String(errorText || "").toLowerCase();
|
const text = String(errorText || "").toLowerCase();
|
||||||
return text.includes("permanent ungültig")
|
return text.includes("permanent ungültig")
|
||||||
|| text.includes("hosternotavailable")
|
|
||||||
|| /file.?not.?found/.test(text)
|
|| /file.?not.?found/.test(text)
|
||||||
|| /file.?unavailable/.test(text)
|
|| /file.?unavailable/.test(text)
|
||||||
|| /link.?is.?dead/.test(text)
|
|| /link.?is.?dead/.test(text)
|
||||||
@ -351,7 +350,8 @@ function isTemporaryUnrestrictError(errorText: string): boolean {
|
|||||||
|| text.includes("bad gateway")
|
|| text.includes("bad gateway")
|
||||||
|| text.includes("gateway timeout")
|
|| text.includes("gateway timeout")
|
||||||
|| text.includes("cloudflare")
|
|| text.includes("cloudflare")
|
||||||
|| text.includes("worker error");
|
|| text.includes("worker error")
|
||||||
|
|| text.includes("hosternotavailable");
|
||||||
}
|
}
|
||||||
|
|
||||||
function isFinishedStatus(status: DownloadStatus): boolean {
|
function isFinishedStatus(status: DownloadStatus): boolean {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user