pub enum ApiError {
Domain(FsError),
Unauthenticated(String),
WorkspaceMismatch,
MalformedBody(String),
RouteNotFound,
MethodNotAllowed,
PayloadTooLarge,
Internal(String),
}Expand description
The uniform error type every fslite-server handler returns.
Variants§
Domain(FsError)
A domain error surfaced by fslite-core.
Unauthenticated(String)
The request carried no, or an unrecognized, credential.
WorkspaceMismatch
The authenticated actor’s workspace does not match the URL.
MalformedBody(String)
The request body was not valid JSON, or failed local validation.
RouteNotFound
No route matched the request.
MethodNotAllowed
The route exists but not for this HTTP method.
PayloadTooLarge
The request body exceeded a transport-level size limit.
Internal(String)
An unexpected server-side failure outside the FsError domain.
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 UnsafeUnpin 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