nyquest_interface/client/error.rs
1//! Error types for client building operations.
2
3use thiserror::Error;
4
5use crate::Error as BackendError;
6
7/// Errors that can occur when building a nyquest HTTP client.
8#[derive(Debug, Error)]
9pub enum BuildClientError {
10 /// No backend has been registered for nyquest.
11 #[error("No backend registered")]
12 NoBackend,
13 /// An error occurred in the backend implementation.
14 #[error("Error creating client: {0}")]
15 BackendError(#[from] BackendError),
16}
17
18/// Result type for client building operations.
19pub type BuildClientResult<T> = Result<T, BuildClientError>;