{"record":{"id":"5062d25cd53f2481","repo":"AlistGo/alist","slug":"relative-url-without-site-url-s","errorCode":null,"errorMessage":"relative url without site url: %s","messagePattern":"relative url without site url: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/strm/util.go","lineNumber":252,"sourceCode":"\tif link.MFile != nil {\n\t\tdefer link.MFile.Close()\n\t\treturn io.ReadAll(link.MFile)\n\t}\n\tif link.RangeReadCloser != nil {\n\t\trc, err := link.RangeReadCloser.RangeRead(ctx, http_range.Range{Length: -1})\n\t\tif err == nil && rc != nil {\n\t\t\tdefer rc.Close()\n\t\t\treturn io.ReadAll(rc)\n\t\t}\n\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}","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/strm/util.go#L234-L270","documentation":"Error \"relative url without site url: %s\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/strm/util.go:252 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"}