{"record":{"id":"cbc351b622bd37c8","repo":"AlistGo/alist","slug":"failed-to-get-file-link","errorCode":null,"errorMessage":"Failed to get file link","messagePattern":"Failed to get file link","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"drivers/proton_drive/util.go","lineNumber":187,"sourceCode":"\n\treturn nil\n}\n\nfunc (d *ProtonDrive) handleTempDownload(w http.ResponseWriter, r *http.Request) {\n\ttoken := strings.TrimPrefix(r.URL.Path, \"/temp/\")\n\n\td.tokenMutex.RLock()\n\tinfo, exists := d.downloadTokens[token]\n\td.tokenMutex.RUnlock()\n\n\tif !exists {\n\t\thttp.Error(w, \"Invalid or expired token\", http.StatusNotFound)\n\t\treturn\n\t}\n\n\tlink, err := d.protonDrive.GetLink(r.Context(), info.LinkID)\n\tif err != nil {\n\t\thttp.Error(w, \"Failed to get file link\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Get file size for range calculations\n\t_, _, attrs, err := d.protonDrive.DownloadFile(r.Context(), link, 0)\n\tif err != nil {\n\t\thttp.Error(w, \"Failed to get file info\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tfileSize := attrs.Size\n\n\trangeHeader := r.Header.Get(\"Range\")\n\tif rangeHeader != \"\" {\n\n\t\t// Parse range header like \"bytes=0-1023\" or \"bytes=1024-\"\n\t\tranges, err := parseRange(rangeHeader, fileSize)\n\t\tif err != nil {","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/proton_drive/util.go#L169-L205","documentation":"Error \"Failed to get file link\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/proton_drive/util.go:187 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the storage configuration and the provider's service status, fix the indicated cause, and retry the operation."],"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"}