pub enum Error {
Show 33 variants
Unauthorized,
PaymentRequired,
Forbidden,
PlanDoesNotAllowAccess,
NotFound(String),
ApplicationStartup(String),
BadRequest(String),
InternalServerError,
InternalServerErrorWithContext(String),
ObjectConflict(String),
UnprocessableEntity {
errors: ErrorMap,
},
Validation(ValidationErrors),
AxumJsonRejection(JsonRejection),
AnyhowError(Error),
AesGcmError,
ConfigForming(String),
DatabaseParsing(String),
StdIO(Error),
Zip(ZipError),
Rusqlite(Error),
S3(Error),
S3Client(SdkError<GetObjectError>),
S3GetObject(GetObjectError),
BaseFileHashMismatch,
ResultingFileHashMismatch,
Diff(String),
SerdeJson(Error),
NoPreviousDatadir,
UnknownMode(String),
TimeFormatDescription(InvalidFormatDescription),
TimeFormat(Format),
UnknownOverrideMode(String),
DatabaseDecoding(String, String),
}Expand description
The main error enum for the application.
This enum covers all possible error cases that can occur in the application, from authentication failures to database errors and file processing issues.
Variants§
Authentication is required but not provided
PaymentRequired
Payment is required to access the resource
Forbidden
User lacks necessary permissions
PlanDoesNotAllowAccess
User’s plan doesn’t allow access
NotFound(String)
Resource not found
ApplicationStartup(String)
Application startup error
BadRequest(String)
Bad request error with context
InternalServerError
Generic internal server error
InternalServerErrorWithContext(String)
Internal server error with context
ObjectConflict(String)
Object conflict error
UnprocessableEntity
Unprocessable entity with validation errors
Validation(ValidationErrors)
Validation error from the validator crate
Tuple Fields
0: ValidationErrorsThe underlying validation errors
AxumJsonRejection(JsonRejection)
JSON parsing rejection from Axum
Tuple Fields
0: JsonRejectionThe underlying Axum JSON rejection error
AnyhowError(Error)
Generic error type for wrapping any error
AesGcmError
Error while encrypting config
ConfigForming(String)
Error while forming config
DatabaseParsing(String)
Error while parsing database values to Rust types
StdIO(Error)
Standard IO error
Zip(ZipError)
Zip error
Tuple Fields
0: ZipErrorThe underlying zip error
Rusqlite(Error)
Rusqlite error
Tuple Fields
0: ErrorThe underlying SQLite error
S3(Error)
S3 error
Tuple Fields
0: ErrorThe underlying S3 error
S3Client(SdkError<GetObjectError>)
S3 client error
Tuple Fields
0: SdkError<GetObjectError>The underlying S3 client error
S3GetObject(GetObjectError)
S3 GetObjectError
Tuple Fields
0: GetObjectErrorThe underlying S3 GetObject error
BaseFileHashMismatch
Base file hash does not match
ResultingFileHashMismatch
Resulting file hash does not match
Diff(String)
Diff error
SerdeJson(Error)
SerdeJson error
NoPreviousDatadir
No previous datadir, send full zip
UnknownMode(String)
Unknown mode
TimeFormatDescription(InvalidFormatDescription)
Time format description error
Tuple Fields
0: InvalidFormatDescriptionThe underlying time format description error
TimeFormat(Format)
Time format error
Tuple Fields
0: FormatThe underlying time format error
UnknownOverrideMode(String)
Unknown override mode
DatabaseDecoding(String, String)
Error while decoding field from database
Implementations§
source§impl Error
impl Error
sourcepub fn unprocessable_entity(errors: ValidationErrors) -> Response
pub fn unprocessable_entity(errors: ValidationErrors) -> Response
Maps validator’s ValidationErrors to a simple map of property
name/error messages structure.
Trait Implementations§
source§impl Error for Error
impl Error for Error
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
Auto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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