{"record":{"id":"fc60940436af861d","repo":"juicedata/juicefs","slug":"invalid-uri-scheme-s","errorCode":null,"errorMessage":"Invalid uri.Scheme: %s","messagePattern":"Invalid uri\\.Scheme: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/object/swift.go","lineNumber":136,"sourceCode":"\t\tkey,\n\t\tobject.Bytes,\n\t\tobject.LastModified,\n\t\tstrings.HasSuffix(key, \"/\"),\n\t\t\"\",\n\t\t\"\",\n\t}, err\n}\n\nfunc newSwiftOSS(endpoint, username, apiKey, token string) (ObjectStorage, error) {\n\tif !strings.Contains(endpoint, \"://\") {\n\t\tendpoint = fmt.Sprintf(\"http://%s\", endpoint)\n\t}\n\turi, err := url.ParseRequestURI(endpoint)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Invalid endpoint %s: %s\", endpoint, err)\n\t}\n\tif uri.Scheme != \"http\" && uri.Scheme != \"https\" {\n\t\treturn nil, fmt.Errorf(\"Invalid uri.Scheme: %s\", uri.Scheme)\n\t}\n\n\thostSlice := strings.SplitN(uri.Host, \".\", 2)\n\tif len(hostSlice) != 2 {\n\t\treturn nil, fmt.Errorf(\"Invalid host: %s\", uri.Host)\n\t}\n\tcontainer := hostSlice[0]\n\thost := hostSlice[1]\n\n\t// current only support V1 authentication\n\tauthURL := uri.Scheme + \"://\" + host + \"/auth/v1.0\"\n\n\tconn := swift.Connection{\n\t\tUserName:  username,\n\t\tApiKey:    apiKey,\n\t\tAuthToken: token,\n\t\tAuthUrl:   authURL,\n\t\tUserAgent: UserAgent,","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/object/swift.go#L118-L154","documentation":"The Swift endpoint parsed successfully but its URI scheme is neither http nor https. Validation guard rejecting non-plaintext-transport schemes, since the Swift client only supports HTTP(S) endpoints.","triggerScenarios":"Thrown at pkg/object/swift.go:136 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an http:// or https:// Swift endpoint"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}