pub enum Error {
Show 14 variants
Http(Error),
Api {
status: u16,
message: String,
},
BadRequest(String),
AuthenticationError(String),
PermissionDenied(String),
NotFound(String),
Conflict(String),
UnprocessableEntity(String),
RateLimitExceeded(String),
InternalServerError(String),
Json(Error),
InvalidApiKey,
Io(Error),
Base64(DecodeError),
}Expand description
Error types for the ZeroEntropy SDK
Variants§
Http(Error)
HTTP request failed
Api
API returned an error status code
BadRequest(String)
Bad request (400)
AuthenticationError(String)
Authentication error (401)
PermissionDenied(String)
Permission denied (403)
NotFound(String)
Resource not found (404)
Conflict(String)
Conflict (409) - resource already exists
UnprocessableEntity(String)
Unprocessable entity (422)
RateLimitExceeded(String)
Rate limit exceeded (429)
InternalServerError(String)
Internal server error (500+)
Json(Error)
Failed to serialize/deserialize JSON
InvalidApiKey
Invalid API key
Io(Error)
IO error
Base64(DecodeError)
Base64 decoding error
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Mutably borrows from an owned value. Read more