Skip to main content

Module error

Module error 

Source
Expand description

Cosmos DB-specific error type carrying typed Cosmos status, the optional wire-level CosmosResponse, and operation diagnostics — for both service errors (real HTTP responses) and synthetic client-side conditions (transport failures, end-to-end timeouts, client validation, etc.).

Mirrors the .NET / Java SDKs’ CosmosException: a single error type that surfaces typed Cosmos status (HTTP status + sub-status, including synthetic codes such as 408 / 20008 for end-to-end timeout), the originating CosmosResponse when one was received, and the operation DiagnosticsContext.

Underlying third-party errors (credential failures, HMAC failures, HTTP transport errors, …) are wrapped at the call site that invokes the third-party API and attached as StdError::source so callers can still downcast through the chain.

Re-exports§

pub use cosmos_status::CosmosStatus;
pub use cosmos_status::SubStatusCode;

Modules§

cosmos_status
Combined HTTP status and Cosmos DB sub-status code.

Structs§

BacktraceOptions
Process-wide backtrace tuning knobs. Programmatic counterpart to the AZURE_COSMOS_BACKTRACE_* environment variables, applied via set_backtrace_options.
CosmosError
Cosmos DB error returned from every public API in the driver (and, by re-export, every public API in the SDK).
CosmosErrorBuilder
Fluent builder for CosmosError. The only way to construct or re-decorate a Cosmos CosmosError.

Functions§

set_backtrace_options
Sets the process-wide backtrace options programmatically, overriding the AZURE_COSMOS_BACKTRACE_* environment variables and the RUST_BACKTRACE / RUST_LIB_BACKTRACE-keyed default.

Type Aliases§

Result
Driver-wide Result alias.