KdrantException
Base type for all errors surfaced by a Kdrant client. A sealed hierarchy lets callers exhaustively when over the failure modes.
Note: kotlinx.coroutines.CancellationException is never wrapped in a KdrantException; it must always propagate so structured concurrency and cancellation keep working.
Inheritors
Types
The collection or resource already exists (HTTP 409). Not retryable.
The referenced collection does not exist.
The credential is valid and does not reach this far (HTTP 403): a read-only JWT asked to write, or a token scoped to other collections. A subclass of Unauthorized so an existing catch (e: KdrantException.Unauthorized) keeps catching it, and a when over the sealed hierarchy stays exhaustive.
The server rejected the request as malformed (HTTP 4xx other than auth/not-found).
A call that the client had to send as several requests failed after some of them were applied.
The server rejected the request because it is rate-limited (HTTP 429). Retryable: the client already retried with backoff, honoring the server's Retry-After, before surfacing this.
The node is refusing writes while still serving reads (HTTP 403, read-only).
An unexpected server-side error (HTTP 5xx other than 503). Not retried automatically.
Qdrant is temporarily unavailable (HTTP 503, e.g. a shard is not ready). Retryable: surfaced only after the client's retries were exhausted.
The request needed a shard whose replicas are not available at the consistency it asked for.
The request exceeded its configured timeout.
A transport/connection-level failure — Qdrant could not be reached (connection refused, DNS failure, connection reset, ...). Transient I/O failures are retried with backoff before this is surfaced.
Authentication failed or is required: no credential, or one the server does not accept (HTTP 401). Forbidden is the narrower case where the credential is valid.