{"record":{"id":"407b8f9db24afd03","repo":"AlistGo/alist","slug":"failed-to-delete-tasks-v-w-407b8f","errorCode":null,"errorMessage":"failed to delete tasks %v: %w","messagePattern":"failed to delete tasks (.+?): %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/thunder/driver.go","lineNumber":659,"sourceCode":"\t}, &resp)\n\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get offline list: %w\", err)\n\t}\n\tres = append(res, resp.Tasks...)\n\treturn res, nil\n}\n\nfunc (xc *XunLeiCommon) DeleteOfflineTasks(ctx context.Context, taskIDs []string, deleteFiles bool) error {\n\t_, err := xc.Request(TASK_API_URL, http.MethodDelete, func(req *resty.Request) {\n\t\treq.SetContext(ctx).\n\t\t\tSetQueryParams(map[string]string{\n\t\t\t\t\"task_ids\":     strings.Join(taskIDs, \",\"),\n\t\t\t\t\"delete_files\": strconv.FormatBool(deleteFiles),\n\t\t\t})\n\t}, nil)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to delete tasks %v: %w\", taskIDs, err)\n\t}\n\treturn nil\n}\n\nfunc (xc *XunLeiCommon) CoreLogin(username string, password string) (sessionID string, err error) {\n\turl := XLUSER_API_BASE_URL + \"/xluser.core.login/v3/login\"\n\tvar resp CoreLoginResp\n\tres, err := xc.Common.Request(url, http.MethodPost, func(req *resty.Request) {\n\t\treq.SetHeader(\"User-Agent\", \"android-ok-http-client/xl-acc-sdk/version-5.0.12.512000\")\n\t\treq.SetBody(&CoreLoginRequest{\n\t\t\tProtocolVersion: \"301\",\n\t\t\tSequenceNo:      \"1000012\",\n\t\t\tPlatformVersion: \"10\",\n\t\t\tIsCompressed:    \"0\",\n\t\t\tAppid:           APPID,\n\t\t\tClientVersion:   \"8.31.0.9726\",\n\t\t\tPeerID:          \"00000000000000000000000000000000\",\n\t\t\tAppName:         \"ANDROID-com.xunlei.downloadprovider\",","sourceCodeStart":641,"sourceCodeEnd":677,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/thunder/driver.go#L641-L677","documentation":"Error \"failed to delete tasks %v: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/thunder/driver.go:659 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the underlying error details in the message, fix the indicated cause (credentials, network, or provider-side failure), and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}