{"record":{"id":"fbbd981461c2a8fa","repo":"AlistGo/alist","slug":"failed-to-upload-file-w-fbbd98","errorCode":null,"errorMessage":"failed to upload file: %w","messagePattern":"failed to upload file: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/proton_drive/util.go","lineNumber":140,"sourceCode":"\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get file info: %w\", err)\n\t}\n\n\t_, err = d.protonDrive.GetLink(ctx, parentLinkID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get parent link: %w\", err)\n\t}\n\n\treader := &progressReader{\n\t\treader:   bufio.NewReader(file),\n\t\ttotal:    size,\n\t\tcurrent:  0,\n\t\tcallback: up,\n\t}\n\n\t_, _, err = d.protonDrive.UploadFileByReader(ctx, parentLinkID, fileName, fileInfo.ModTime(), reader, 0)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to upload file: %w\", err)\n\t}\n\n\treturn nil\n}\n\nfunc (d *ProtonDrive) ensureTempServer() error {\n\tif d.tempServer != nil {\n\n\t\t// Already running\n\t\treturn nil\n\t}\n\n\tlistener, err := net.Listen(\"tcp\", \":0\")\n\tif err != nil {\n\t\treturn err\n\t}\n\td.tempServerPort = listener.Addr().(*net.TCPAddr).Port\n","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/proton_drive/util.go#L122-L158","documentation":"Error \"failed to upload file: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/proton_drive/util.go:140 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"}