{"record":{"id":"c335ab2b38eae461","repo":"juicedata/juicefs","slug":"invalid-endpoint-s-s-c335ab","errorCode":null,"errorMessage":"Invalid endpoint %s: %s","messagePattern":"Invalid endpoint (.+?): (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/object/swift.go","lineNumber":133,"sourceCode":"\t\treturn nil, err\n\t}\n\treturn &obj{\n\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,","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/object/swift.go#L115-L151","documentation":"url.ParseRequestURI rejected the OpenStack Swift endpoint after default scheme prefixing. Validation guard: the endpoint is not a well-formed URI (malformed host, invalid characters, or bad scheme separator), preventing client construction.","triggerScenarios":"Thrown at pkg/object/swift.go:133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a valid http(s) endpoint, e.g. https://container.auth.domain/v1"],"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"}