pub enum ClientError {
RequestFailed(Status),
JsonError(Error),
ResourceError(DeployResourceError),
DeserializationFailed {
value: String,
source: Error,
},
SerializationFailed {
source: Error,
},
}Expand description
Represents the different types of errors that can occur in the client.
The ClientError enum encapsulates various error types, providing a unified way to handle errors
that arise during client operations, including networking issues, JSON processing errors, and
resource-related errors. Each variant includes contextual information to help diagnose and resolve
issues effectively.
§Variants
-
RequestFailedRepresents an error originating from a gRPC request. This variant wraps thetonic::Statuserror type, which provides details about the request failure.- Source:
tonic::Status
- Source:
-
JsonErrorRepresents a general JSON parsing or serialization error. This variant wraps theserde_json::Errortype, which is returned when JSON data cannot be processed correctly.- Source:
serde_json::Error
- Source:
-
ResourceErrorRepresents an error related to resource deployment. This variant wraps theDeployResourceErrortype, which provides context about specific resource-related issues.- Source:
DeployResourceError
- Source:
-
DeserializationFailedIndicates that deserialization of a JSON string failed. This variant provides additional context by including the original value that caused the error, as well as the underlyingserde_json::Error.- Fields:
value: The JSON string that failed to deserialize.source: The underlyingserde_json::Error.
- Fields:
-
SerializationFailedIndicates that serialization of data into JSON failed. This variant includes the underlyingserde_json::Errorto provide details about the failure.- Fields:
source: The underlyingserde_json::Error.
- Fields:
Variants§
RequestFailed(Status)
JsonError(Error)
ResourceError(DeployResourceError)
DeserializationFailed
SerializationFailed
Trait Implementations§
Source§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl<T> From<ClientError> for WorkerError<T>
impl<T> From<ClientError> for WorkerError<T>
Source§fn from(source: ClientError) -> Self
fn from(source: ClientError) -> Self
Source§impl From<DeployResourceError> for ClientError
impl From<DeployResourceError> for ClientError
Source§fn from(source: DeployResourceError) -> Self
fn from(source: DeployResourceError) -> Self
Source§impl From<Error> for ClientError
impl From<Error> for ClientError
Auto Trait Implementations§
impl !Freeze for ClientError
impl !RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl !UnwindSafe for ClientError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.