pub enum Error {
Show 15 variants
Common(CommonError),
AuthorizationHeaderMalformed(String),
NoSuchKey,
NoSuchUpload,
PreconditionFailed,
InvalidPart,
InvalidPartOrder,
EntityTooSmall,
InvalidUtf8Str(Utf8Error),
InvalidUtf8String(FromUtf8Error),
InvalidXml(String),
InvalidRange((HttpRangeParseError, u64)),
InvalidEncryptionAlgorithm(String),
InvalidDigest(String),
NotImplemented(String),
}
Expand description
Errors of this crate
Variants§
Common(CommonError)
Error from common error
AuthorizationHeaderMalformed(String)
Authorization Header Malformed
NoSuchKey
The object requested don’t exists
NoSuchUpload
The multipart upload requested don’t exists
PreconditionFailed
Precondition failed (e.g. x-amz-copy-source-if-match)
InvalidPart
Parts specified in CMU request do not match parts actually uploaded
InvalidPartOrder
Parts given to CompleteMultipartUpload were not in ascending order
EntityTooSmall
In CompleteMultipartUpload: not enough data (here we are more lenient than AWS S3)
InvalidUtf8Str(Utf8Error)
The request contained an invalid UTF-8 sequence in its path or in other parameters
InvalidUtf8String(FromUtf8Error)
The request used an invalid path
InvalidXml(String)
The client sent invalid XML data
InvalidRange((HttpRangeParseError, u64))
The client sent a range header with invalid value
InvalidEncryptionAlgorithm(String)
The client sent a range header with invalid value
InvalidDigest(String)
The client sent invalid XML data
NotImplemented(String)
The client sent a request for an action not supported by garage
Implementations§
Trait Implementations§
Source§impl ApiError for Error
impl ApiError for Error
Source§fn http_status_code(&self) -> StatusCode
fn http_status_code(&self) -> StatusCode
Get the HTTP status code that best represents the meaning of the error for the client
fn add_http_headers(&self, header_map: &mut HeaderMap<HeaderValue>)
fn http_body(&self, garage_region: &str, path: &str) -> ErrorBody
Source§impl CommonErrorDerivative for Error
impl CommonErrorDerivative for Error
Source§impl Error for Error
impl Error for Error
Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
Source§impl From<(HttpRangeParseError, u64)> for Error
impl From<(HttpRangeParseError, u64)> for Error
Source§fn from(from: (HttpRangeParseError, u64)) -> Self
fn from(from: (HttpRangeParseError, u64)) -> Self
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(err: SignatureError) -> Self
fn from(err: SignatureError) -> Self
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(from: FromUtf8Error) -> Self
fn from(from: FromUtf8Error) -> Self
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more