{"record":{"id":"3f5ce9f25322d3cb","repo":"microsoft/aspire","slug":"endpoint-is-unavailable","errorCode":null,"errorMessage":"Endpoint is unavailable","messagePattern":"Endpoint is unavailable","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting.Qdrant/QdrantBuilderExtensions.cs","lineNumber":228,"sourceCode":"            var connectionBuilder = new DbConnectionStringBuilder\n            {\n                ConnectionString = connectionString\n            };\n\n            if (connectionBuilder.TryGetValue(\"Endpoint\", out var endpointValue) && Uri.TryCreate(endpointValue.ToString(), UriKind.Absolute, out var serviceUri))\n            {\n                endpoint = serviceUri;\n            }\n\n            if (connectionBuilder.TryGetValue(\"Key\", out var keyValue))\n            {\n                key = keyValue.ToString();\n            }\n        }\n\n        if (endpoint is null)\n        {\n            throw new InvalidOperationException(\"Endpoint is unavailable\");\n        }\n\n        var client = new QdrantClient(endpoint, key);\n        return client;\n    }\n}\n","sourceCodeStart":210,"sourceCodeEnd":235,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting.Qdrant/QdrantBuilderExtensions.cs#L210-L235","documentation":"CreateQdrantClient parses the connection string into an endpoint and optional key. If the string parses (or is present) but no endpoint could be extracted — e.g. it is a key/value pair lacking an 'Endpoint' entry, or the URI could not be created — it throws InvalidOperationException('Endpoint is unavailable'). A QdrantClient cannot be constructed without an endpoint URI.","triggerScenarios":"Passing a connection string that is not an absolute URI and whose key/value pairs do not contain an 'Endpoint' key, so `endpoint` remains null after parsing.","commonSituations":"Supplying only 'Key=...' in the connection string; using a relative or malformed URL; typos like 'endpoint=' lowercase is fine but 'Url=' or 'Host=' are not recognized; copying a connection string format from a different provider.","solutions":["Include an 'Endpoint' key in the connection string, e.g. 'Endpoint=http://localhost:6334;Key=secret'.","Or pass the connection string as a plain absolute URI like 'http://localhost:6334'.","Fix typos in the key name so it exactly matches 'Endpoint'.","Validate the URL is absolute and well-formed (scheme + host)."],"exampleFix":"// before\n\"Key=secret\"\n\n// after\n\"Endpoint=http://localhost:6334;Key=secret\"","handlingStrategy":"validation","validationCode":"// Validate the connection string shape before wiring it in\nif (!Uri.TryCreate(connectionString, UriKind.Absolute, out _) &&\n    !connectionString.Contains(\"Endpoint=\", StringComparison.OrdinalIgnoreCase))\n{\n    throw new InvalidOperationException(\"Qdrant connection string must be an absolute URI or contain 'Endpoint=<uri>'.\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the canonical format 'Endpoint=http://host:6334;Key=<key>'.","Avoid copying connection string formats from other databases.","Double-check key casing ('Endpoint', not 'Url' or 'Host')."],"tags":["qdrant","connection-string","endpoint","invalid-url-format","aspire-hosting"],"backgroundTag":"invalid-url-format","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}