{"record":{"id":"67c541cabf5d4642","repo":"AlistGo/alist","slug":"failed","errorCode":null,"errorMessage":"failed","messagePattern":"failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/offline_download/guangyapan/guangyapan.go","lineNumber":121,"sourceCode":"\t\treturn nil, errors.New(\"GuangYaPan offline download only supports GuangYaPan destination storage\")\n\t}\n\ttasks, err := g.GetTasks(driver, task.GID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tstatus := &tool.Status{\n\t\tStatus: \"the task has been deleted\",\n\t}\n\tfor _, t := range tasks {\n\t\tif t.TaskID != task.GID {\n\t\t\tcontinue\n\t\t}\n\t\tstatus.Progress = float64(t.Progress)\n\t\tstatus.TotalBytes = t.TotalSize\n\t\tstatus.Completed = t.Status == offlineStatusCompleted || t.Status == offlineStatusPartiallyCompleted\n\t\tstatus.Status = taskStatusText(t)\n\t\tif t.Status == offlineStatusFailed || t.Status == offlineStatusCanceled {\n\t\t\tstatus.Err = errors.New(status.Status)\n\t\t}\n\t\treturn status, nil\n\t}\n\tstatus.Err = errors.New(\"the task has been deleted\")\n\treturn status, nil\n}\n\nfunc init() {\n\ttool.Tools.Add(&GuangYaPan{})\n}\n","sourceCodeStart":103,"sourceCodeEnd":132,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/internal/offline_download/guangyapan/guangyapan.go#L103-L132","documentation":"Status maps a provider task state of offlineStatusFailed to status.Err = errors.New(taskStatusText(t)), which for the failed state yields the bare text \"failed\". Like the 123 Open equivalent, the provider exposes no detailed reason, so the error message is just the state name. Completed and partially-completed states are treated as success; only failed/canceled produce an Err.","triggerScenarios":"Polling GuangYaPan.Status when the provider-side task transitioned to the failed state (t.Status == offlineStatusFailed). Typical provider-side causes: invalid URL, source unreachable, account limits.","commonSituations":"Dead or region-blocked source links, GuangYaPan account offline-download quota exhausted, or provider-side transcode failure. Users see only \"failed\" with no diagnostics.","solutions":["Retry the AddURL with a verified-working URL","Check the GuangYaPan provider console/app for the actual task failure reason","Verify account quota and VIP status for offline downloads"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// After Status(task):\nif st.Err != nil && st.Status == \"failed\" {\n    // provider-side failure, terminal; surface to user, stop polling\n    notifyUser(task, \"offline download failed on provider side\")\n    stopPolling(task)\n}","preventionTips":["Pre-verify source links before submitting (HEAD request where possible","Respect provider concurrency/quota limits when adding tasks","Map provider failure text to user-actionable messages in your layer"],"tags":["offline-download","guangyapan","status-polling"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}