{"record":{"id":"688df3e0c2a62af1","repo":"AlistGo/alist","slug":"upload-slice-d-failed-w","errorCode":null,"errorMessage":"upload slice %d failed: %w","messagePattern":"upload slice (.+?) failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/123_open/upload.go","lineNumber":128,"sourceCode":"\t\t\tbreak\n\t\t}\n\t\tsliceNo := i + 1\n\t\toffset := i * sliceSize\n\t\tlength := min(sliceSize, size-offset)\n\t\tthreadG.Go(func() error {\n\t\t\tsliceMD5, err := utils.HashReader(utils.MD5, io.NewSectionReader(tmpF, offset, length))\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"calculate md5 of slice %d failed: %w\", sliceNo, err)\n\t\t\t}\n\t\t\treader := &progressReader{\n\t\t\t\tReader:   io.NewSectionReader(tmpF, offset, length),\n\t\t\t\tprogress: progress,\n\t\t\t}\n\t\t\tserver := servers[int(i)%len(servers)]\n\t\t\terr = d.client.Upload.UploadSlice(uploadCtx, server, created.PreuploadID, sliceNo, sliceMD5,\n\t\t\t\tdriver.NewLimitedUploadStream(uploadCtx, reader))\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"upload slice %d failed: %w\", sliceNo, err)\n\t\t\t}\n\t\t\treturn nil\n\t\t})\n\t}\n\tif err := threadG.Wait(); err != nil {\n\t\treturn nil, err\n\t}\n\tif err := ctx.Err(); err != nil {\n\t\treturn nil, err\n\t}\n\n\t// The server merges and verifies the slices asynchronously. While it is\n\t// working it may answer either with completed=false or with an\n\t// undocumented business error (observed: code 20103, \"文件正在...\"), so\n\t// both are treated as \"not finished yet\" and the last one is only\n\t// reported once the attempts run out.\n\tvar lastErr error\n\tfor i := 0; i < completeMaxPolls; i++ {","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/123_open/upload.go#L110-L146","documentation":"Error \"upload slice %d failed: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/123_open/upload.go:128 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"}