KdrantException

sealed class KdrantException : Exception

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

Link copied to clipboard

The collection or resource already exists (HTTP 409). Not retryable.

Link copied to clipboard
class CollectionNotFound(val collection: String, serverMessage: String? = null) : KdrantException

The referenced collection does not exist.

Link copied to clipboard

The server rejected the request as malformed (HTTP 4xx other than auth/not-found).

Link copied to clipboard
class RateLimited(val retryAfter: Duration? = null, message: String = "Rate limited by Qdrant (HTTP 429)") : KdrantException

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.

Link copied to clipboard

An unexpected server-side error (HTTP 5xx other than 503). Not retried automatically.

Link copied to clipboard
class ServiceUnavailable(message: String = "Qdrant is temporarily unavailable (HTTP 503)") : KdrantException

Qdrant is temporarily unavailable (HTTP 503, e.g. a shard is not ready). Retryable: surfaced only after the client's retries were exhausted.

Link copied to clipboard
class Timeout(message: String, cause: Throwable? = null) : KdrantException

The request exceeded its configured timeout.

Link copied to clipboard
class Transport(message: String, cause: Throwable? = null) : KdrantException

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.

Link copied to clipboard
class Unauthorized(message: String = "Unauthorized") : KdrantException

Authentication failed or is required (missing/invalid API key).

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open val message: String?