qcs_api_client_grpc/tonic/
error.rsuse http::{header::InvalidHeaderValue, uri::InvalidUri};
use tonic::transport::Error as TransportError;
use qcs_api_client_common::configuration::LoadError;
use super::{channel::ChannelError, RequestBodyDuplicationError};
#[derive(Debug, thiserror::Error)]
#[allow(variant_size_differences)]
pub enum Error<E>
where
E: std::error::Error,
{
#[error("failed to refresh access token: {0}")]
Refresh(#[source] E),
#[error("failed to load QCS config: {0}")]
Load(#[from] LoadError),
#[error("failed to parse URI: {0}")]
InvalidUri(#[from] InvalidUri),
#[error("service call failed with error: {0}")]
Transport(#[from] TransportError),
#[error("access token is not a valid header value: {0}")]
InvalidAccessToken(#[source] InvalidHeaderValue),
#[error("The channel configuration caused an error: {0}")]
ChannelError(#[from] ChannelError),
#[cfg(feature = "grpc-web")]
#[error("The hyper grpc-web client returned an error: {0}")]
HyperError(#[from] hyper::Error),
#[error("failed to duplicate request body for retry: {0}")]
CloneBody(#[from] RequestBodyDuplicationError),
}