pub enum BatataError {
Show 15 variants
ConfigNotFound {
data_id: String,
group: String,
namespace: String,
},
ServiceNotFound {
service_name: String,
group_name: String,
namespace: String,
},
ConnectionError {
message: String,
},
ServerError {
error_code: i32,
message: String,
},
AuthError {
message: String,
},
PermissionDenied {
message: String,
},
Timeout {
timeout_ms: u64,
},
SerializationError(Error),
TransportError(Error),
GrpcStatus(Status),
InvalidParameter(String),
Internal(String),
NoAvailableServer,
ClientNotStarted,
ClientAlreadyStarted,
}Expand description
Error types for Batata client operations
Variants§
ConfigNotFound
Configuration not found
ServiceNotFound
Service not found
ConnectionError
Connection error
ServerError
Server error with error code
AuthError
Authentication error
PermissionDenied
Permission denied
Timeout
Request timeout
SerializationError(Error)
Serialization/Deserialization error
TransportError(Error)
gRPC transport error
GrpcStatus(Status)
gRPC status error
InvalidParameter(String)
Invalid parameter
Internal(String)
Internal error
NoAvailableServer
No available server
ClientNotStarted
Client not started
ClientAlreadyStarted
Client already started
Implementations§
Source§impl BatataError
impl BatataError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if the error is retryable
Sourcepub fn server_error(error_code: i32, message: impl Into<String>) -> Self
pub fn server_error(error_code: i32, message: impl Into<String>) -> Self
Create a server error from error code and message
Sourcepub fn connection_error(message: impl Into<String>) -> Self
pub fn connection_error(message: impl Into<String>) -> Self
Create a connection error
Trait Implementations§
Source§impl Debug for BatataError
impl Debug for BatataError
Source§impl Display for BatataError
impl Display for BatataError
Source§impl Error for BatataError
impl Error for BatataError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for BatataError
impl From<Error> for BatataError
Source§impl From<Error> for BatataError
impl From<Error> for BatataError
Auto Trait Implementations§
impl Freeze for BatataError
impl !RefUnwindSafe for BatataError
impl Send for BatataError
impl Sync for BatataError
impl Unpin for BatataError
impl !UnwindSafe for BatataError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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>
Wrap the input message
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.