pub enum ProxyError {
}Expand description
Central error type for the proxy, mapping each variant to an S3-compatible HTTP response.
Variants§
BucketNotFound(String)
The requested virtual bucket does not exist in the registry.
NoSuchKey(String)
The requested object key was not found in the backend store.
AccessDenied
The caller’s identity lacks permission for the requested operation.
SignatureDoesNotMatch
The SigV4 signature in the request does not match the expected value.
InvalidRequest(String)
The request is malformed or contains invalid parameters.
MissingAuth
The request contains no authentication credentials.
ExpiredCredentials
The credentials used to sign the request have expired.
InvalidOidcToken(String)
The OIDC token provided for STS role assumption is invalid or untrusted.
RoleNotFound(String)
The IAM role specified in an STS request does not exist.
BackendError(String)
The upstream object store backend returned an error.
PreconditionFailed
A conditional request header (e.g. If-Match) was not satisfied.
NotModified
The object has not been modified since the time specified by If-Modified-Since.
ConfigError(String)
The proxy configuration is invalid or incomplete.
Internal(String)
An unexpected internal error occurred.
Implementations§
Source§impl ProxyError
impl ProxyError
Sourcepub fn s3_error_code(&self) -> &'static str
pub fn s3_error_code(&self) -> &'static str
Return the S3-compatible XML error code.
Sourcepub fn status_code(&self) -> u16
pub fn status_code(&self) -> u16
HTTP status code for this error.
Sourcepub fn safe_message(&self) -> String
pub fn safe_message(&self) -> String
Return a message safe to show to external clients.
For server-side errors (5xx), returns a generic message to avoid leaking backend infrastructure details. For client errors (4xx), returns the full message (the client already knows the bucket name, key, etc.).
Sourcepub fn from_object_store_error(e: Error) -> Self
pub fn from_object_store_error(e: Error) -> Self
Convert an object_store::Error into a ProxyError.
Trait Implementations§
Source§impl Debug for ProxyError
impl Debug for ProxyError
Source§impl Display for ProxyError
impl Display for ProxyError
Source§impl Error for ProxyError
impl Error for ProxyError
1.30.0 · 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
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ProxyError
impl RefUnwindSafe for ProxyError
impl Send for ProxyError
impl Sync for ProxyError
impl Unpin for ProxyError
impl UnsafeUnpin for ProxyError
impl UnwindSafe for ProxyError
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 moreSource§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.