pub enum ProblemConversionError {
UnknownProblemType(String),
InvalidContext {
category: &'static str,
source: Error,
},
InvalidStatus(u16),
CategoryStatusMismatch {
category: &'static str,
status: u16,
},
}Expand description
Reasons a Problem cannot be reconstructed as a CanonicalError.
Variants§
UnknownProblemType(String)
The problem_type URI does not match any of the 16 canonical
category identifiers. Either the server emitted a non-canonical
problem or the wire format has drifted.
InvalidContext
The context payload could not be deserialized into the context
type for the matched category. The category and underlying serde
error are surfaced for diagnostics.
InvalidStatus(u16)
The wire status is not a valid HTTP status code (RFC 9110: a
three-digit integer in the 100-599 range). Rejected here rather than
silently stored as an override, since TryFrom<Problem> is the
crate’s one boundary for untrusted/out-of-process input.
CategoryStatusMismatch
The wire status is syntactically valid but is in a different HTTP
status-code class than the matched category’s default, e.g. an
invalid_argument (4xx) Problem carrying status: 500. Flipping
between client-fault and server-fault semantics changes client retry
behavior, so this is rejected rather than accepted as an override.
Trait Implementations§
Source§impl Debug for ProblemConversionError
impl Debug for ProblemConversionError
Source§impl Display for ProblemConversionError
impl Display for ProblemConversionError
Source§impl Error for ProblemConversionError
impl Error for ProblemConversionError
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 !RefUnwindSafe for ProblemConversionError
impl !UnwindSafe for ProblemConversionError
impl Freeze for ProblemConversionError
impl Send for ProblemConversionError
impl Sync for ProblemConversionError
impl Unpin for ProblemConversionError
impl UnsafeUnpin for ProblemConversionError
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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