pub enum ApiError {
Lago(LagoError),
BadRequest(String),
NotFound(String),
Internal(String),
}Expand description
API-level error type that wraps LagoError and adds HTTP-specific variants.
Variants§
Lago(LagoError)
Wraps a core LagoError.
BadRequest(String)
400 Bad Request with a human-readable message.
NotFound(String)
404 Not Found with a description of what was missing.
Internal(String)
500 Internal Server Error with an opaque message.
Trait Implementations§
Source§impl IntoResponse for ApiError
impl IntoResponse for ApiError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for ApiError
impl !RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl !UnwindSafe for ApiError
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