pub enum AppError {
Show 17 variants
Database(Error),
NotFound(String),
Validation(String),
Auth(String),
Forbidden(String),
Conflict(String),
BadRequest(String),
Internal(String),
Config(String),
Nats(String),
Serialization(Error),
Template(String),
Encryption(String),
ExternalService(String),
Parse(String),
ResidencyViolation {
credential: String,
entry_region: String,
server_region: String,
},
CrossRegionUnreachable {
broker_url: String,
cause: String,
},
}Expand description
Application-level errors for the control plane.
Variants§
Database(Error)
Database error
NotFound(String)
Not found error
Validation(String)
Validation error
Auth(String)
Authentication error
Forbidden(String)
Authorization error
Conflict(String)
Conflict error (e.g., duplicate resource)
BadRequest(String)
Bad request error
Internal(String)
Internal server error
Config(String)
Configuration error
Nats(String)
NATS messaging error
Serialization(Error)
Serialization error
Template(String)
Template rendering error
Encryption(String)
Encryption error
ExternalService(String)
External service error
Parse(String)
Parse error (YAML, JSON, etc.)
ResidencyViolation
Secrets Wallet Phase 6c — residency policy violation: a server
in one region attempted to resolve a keychain entry whose
residency: strict policy region-locks it elsewhere. Surfaces
to operators as HTTP 403 with a clear “credential X is
region-locked to Y; this server is in Z” message that NEVER
includes the value itself.
CrossRegionUnreachable
Secrets Wallet Phase 6e — cross-region broker is configured for
the credential’s home region but unreachable / returned a non-2xx /
produced a malformed envelope. HTTP 502 to the caller so they can
distinguish “policy says no” (403 from ResidencyViolation) from
“policy says yes via broker, but the broker is down” (transient).
cause is a free-text reason — never a structured error chain
(we don’t want #[source]-style trait-object plumbing inside an
HTTP-bounded error).
Trait Implementations§
Source§impl Error for AppError
impl Error for AppError
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()
Source§impl From<SnowflakeError> for AppError
impl From<SnowflakeError> for AppError
Source§fn from(err: SnowflakeError) -> Self
fn from(err: SnowflakeError) -> Self
Source§impl IntoResponse for AppError
impl IntoResponse for AppError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Auto Trait Implementations§
impl !RefUnwindSafe for AppError
impl !UnwindSafe for AppError
impl Freeze for AppError
impl Send for AppError
impl Sync for AppError
impl Unpin for AppError
impl UnsafeUnpin for AppError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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