{"record":{"id":"5c50c69f8f7e5629","repo":"AlistGo/alist","slug":"upload-failed-status-d","errorCode":null,"errorMessage":"upload failed, status: %d","messagePattern":"upload failed, status: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/ilanzou/driver.go","lineNumber":374,"sourceCode":"\t\t\t\t\"tokenTime=\" + time.Now().Format(\"Mon Jan 02 2006 15:04:05 GMT-0700 (MST)\"),\n\t\t\t}\n\t\t\tqueryString := strings.Join(params, \"&\")\n\t\t\treq.SetQueryString(queryString).SetResult(&resp)\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif len(resp.List) == 0 {\n\t\t\treturn nil, fmt.Errorf(\"upload failed, empty response\")\n\t\t}\n\t\tif resp.List[0].Status == 1 {\n\t\t\tbreak\n\t\t}\n\t\ttime.Sleep(time.Second * 1)\n\t}\n\tfile := resp.List[0]\n\tif file.Status != 1 {\n\t\treturn nil, fmt.Errorf(\"upload failed, status: %d\", resp.List[0].Status)\n\t}\n\treturn &model.Object{\n\t\tID: strconv.FormatInt(file.FileId, 10),\n\t\t//Path:     ,\n\t\tName:     file.FileName,\n\t\tSize:     s.GetSize(),\n\t\tModified: s.ModTime(),\n\t\tCtime:    s.CreateTime(),\n\t\tIsFolder: false,\n\t\tHashInfo: utils.NewHashInfo(utils.MD5, etag),\n\t}, nil\n}\n\n//func (d *ILanZou) Other(ctx context.Context, args model.OtherArgs) (interface{}, error) {\n//\treturn nil, errs.NotSupport\n//}\n\nvar _ driver.Driver = (*ILanZou)(nil)","sourceCodeStart":356,"sourceCodeEnd":392,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/ilanzou/driver.go#L356-L392","documentation":"Thrown by ILanZou's upload after the poll loop exited: the first result entry exists but its Status is not 1 (success). The numeric status is included. This is the server reporting the upload finished with a failure state (or the loop's iteration cap hit while status was still pending, leaving a non-1 status like 0).","triggerScenarios":"Server-side processing failure of the uploaded blob; upload quota exceeded; file content rejected by moderation; poll loop terminated while status was still 'processing' (0) so it never reached 1.","commonSituations":"Large files where server-side processing exceeds the poll budget; accounts at storage quota; files with names/content the provider rejects; slow server days where every upload ends in a non-1 status.","solutions":["Retry the Put — transient server-side processing failures commonly resolve on a second attempt.","Free account space / check quota if the status consistently maps to storage limits.","Rename the file (remove characters the provider may reject) and retry.","Raise the poll-iteration budget (or total wait) in the driver if the status is 0-pending rather than a hard failure code."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"obj, err := d.Put(ctx, dstDir, stream, up)\nif err != nil {\n    if strings.Contains(err.Error(), \"upload failed, status\") && statusIsPending(err) {\n        time.Sleep(3 * time.Second)\n        obj, err = d.Put(ctx, dstDir, stream, up) // or re-poll results\n    }\n    if err != nil { return err }\n}","preventionTips":["Retry uploads once on non-1 status — transient processing failures are common","Check account quota before large uploads","Avoid filenames/characters the provider moderates"],"tags":["ilanzou","upload","status-code","polling"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}