{"record":{"id":"f60f64702d3d9bb8","repo":"AlistGo/alist","slug":"complete-upload-of-s-failed-w","errorCode":null,"errorMessage":"complete upload of %s failed: %w","messagePattern":"complete upload of (.+?) failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/123_open/upload.go","lineNumber":164,"sourceCode":"\tfor i := 0; i < completeMaxPolls; i++ {\n\t\tres, err := d.client.Upload.Complete(ctx, created.PreuploadID)\n\t\tswitch {\n\t\tcase err != nil:\n\t\t\tlastErr = err\n\t\tcase res.Completed && res.FileID != 0:\n\t\t\tup(100)\n\t\t\treturn uploadedObj(res.FileID, file, etag), nil\n\t\tdefault:\n\t\t\tlastErr = nil\n\t\t}\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\treturn nil, ctx.Err()\n\t\tcase <-time.After(completePollInterval):\n\t\t}\n\t}\n\tif lastErr != nil {\n\t\treturn nil, fmt.Errorf(\"complete upload of %s failed: %w\", file.GetName(), lastErr)\n\t}\n\treturn nil, fmt.Errorf(\"complete upload of %s timed out while the server was merging the slices\", file.GetName())\n}\n\n// uploadedObj describes the file the server created for an upload.\nfunc uploadedObj(fileID int64, file model.FileStreamer, etag string) model.Obj {\n\treturn &model.Object{\n\t\tID:       strconv.FormatInt(fileID, 10),\n\t\tName:     file.GetName(),\n\t\tSize:     file.GetSize(),\n\t\tModified: time.Now(),\n\t\tCtime:    time.Now(),\n\t\tHashInfo: utils.NewHashInfo(utils.MD5, etag),\n\t}\n}\n\n// uploadProgress accumulates the bytes uploaded by all concurrent slices and\n// forwards the overall percentage. Reporting is serialized because the callback","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/123_open/upload.go#L146-L182","documentation":"Error \"complete upload of %s failed: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/123_open/upload.go:164 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-15T17:31:12.345Z"}