{"record":{"id":"7e712a44293f65b4","repo":"AlistGo/alist","slug":"read-url-failed-status-d","errorCode":null,"errorMessage":"read url failed: status=%d","messagePattern":"read url failed: status=(.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/strm/util.go","lineNumber":262,"sourceCode":"\t}\n\tif link.URL == \"\" {\n\t\treturn nil, fmt.Errorf(\"empty link\")\n\t}\n\turl := link.URL\n\tif !strings.HasPrefix(url, \"http://\") && !strings.HasPrefix(url, \"https://\") {\n\t\tapi := common.GetApiUrl(nil)\n\t\tif api == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"relative url without site url: %s\", url)\n\t\t}\n\t\turl = strings.TrimSuffix(api, \"/\") + url\n\t}\n\tres, err := base.RestyClient.R().SetContext(ctx).SetDoNotParseResponse(true).Get(url)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer res.RawBody().Close()\n\tif res.StatusCode() >= http.StatusBadRequest {\n\t\treturn nil, fmt.Errorf(\"read url failed: status=%d\", res.StatusCode())\n\t}\n\treturn io.ReadAll(res.RawBody())\n}\n\nfunc (d *Strm) writeLocal(path string, payload []byte, mode string) error {\n\tif mode == SaveLocalInsertMode && utils.Exists(path) {\n\t\treturn nil\n\t}\n\tif st, err := os.Stat(path); err == nil && st.IsDir() {\n\t\tif mode != SaveLocalSyncMode {\n\t\t\treturn nil\n\t\t}\n\t\tif err = os.RemoveAll(path); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif mode != SaveLocalInsertMode {\n\t\tif old, err := os.ReadFile(path); err == nil {","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/strm/util.go#L244-L280","documentation":"Error \"read url failed: status=%d\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/strm/util.go:262 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"}