pub struct AppError { /* private fields */ }Expand description
Wrapper that converts a MediatorError into an Axum HTTP response.
Implementations§
Source§impl AppError
impl AppError
Sourcepub fn with_context(self, ctx: ErrorContext) -> Self
pub fn with_context(self, ctx: ErrorContext) -> Self
Attach structured context (request_id, session_id, did_hash) to this error.
The context fields will be included in log output and — where appropriate — in the JSON response sent to the client.
Trait Implementations§
Source§impl IntoResponse for AppError
impl IntoResponse for AppError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for AppError
impl RefUnwindSafe for AppError
impl Send for AppError
impl Sync for AppError
impl Unpin for AppError
impl UnsafeUnpin for AppError
impl UnwindSafe 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
Mutably borrows from an owned value. Read more