Skip to main content

rig_vectorize/client/
error.rs

1//! Error types for the Vectorize client.
2
3/// Errors that can occur when interacting with Cloudflare Vectorize.
4#[derive(Debug, thiserror::Error)]
5pub enum VectorizeError {
6    #[error("HTTP request failed: {0}")]
7    HttpError(#[from] reqwest::Error),
8
9    #[error("Vectorize API error (code: {code}): {message}")]
10    ApiError { code: u32, message: String },
11
12    #[error("JSON serialization error: {0}")]
13    SerializationError(#[from] serde_json::Error),
14
15    #[error("Unsupported filter operation: {0}")]
16    UnsupportedFilterOperation(String),
17}