···11-use thiserror::Error;
2133-/// These errors relate to the process of importing RSVP data into the system
44-/// by administrators, typically during data migration or recovery.
55-#[derive(Debug, Error)]
66-pub(crate) enum AdminImportRsvpError {
77- /// Error when an RSVP cannot be inserted during import.
88- ///
99- /// This error occurs when attempting to insert an imported RSVP into
1010- /// the database fails, typically due to data validation issues or
1111- /// database constraints.
1212- #[error("error-admin-import-rsvp-1 Failed to insert RSVP: {0}")]
1313- InsertFailed(String),
1414-}
-28
src/http/errors/common_error.rs
···1717 #[error("error-common-2 Not authorized to perform this action")]
1818 NotAuthorized,
19192020- /// Error when an unsupported event type is encountered.
2121- ///
2222- /// This error occurs when an operation is attempted on an event type
2323- /// that is not supported by the current functionality.
2424- #[error("error-common-3 Unsupported event type")]
2525- UnsupportedEventType,
2626-2720 /// Error when a required field is missing.
2821 ///
2922 /// This error occurs when a form or request is missing a mandatory field
3023 /// that is needed to complete the operation.
3124 #[error("error-common-4 Required field not provided")]
3225 FieldRequired,
3333-3434- /// Error when an AT Protocol URI has an invalid format.
3535- ///
3636- /// This error occurs when an AT Protocol URI is malformed or
3737- /// doesn't follow the expected format specification.
3838- #[error("error-common-6 Invalid AT-URI format")]
3939- InvalidAtUri,
4040-4141- /// Error when a requested record cannot be found.
4242- ///
4343- /// This error occurs when an operation is attempted on a record
4444- /// that doesn't exist in the database.
4545- #[error("error-common-7 Record not found")]
4646- RecordNotFound,
4747-4848- /// Error when record data cannot be parsed.
4949- ///
5050- /// This error occurs when a record's data cannot be properly
5151- /// deserialized or parsed into the expected structure.
5252- #[error("error-common-8 Failed to parse record data")]
5353- FailedToParse,
54265527 /// Error when event data has an invalid format or is corrupted.
5628 ///
-1
src/http/errors/mod.rs
···1313pub mod view_event_error;
1414pub mod web_error;
15151616-pub(crate) use admin_errors::AdminImportRsvpError;
1716pub(crate) use common_error::CommonError;
1817pub(crate) use create_event_errors::CreateEventError;
1918pub(crate) use edit_event_error::EditEventError;
-8
src/http/errors/web_error.rs
···1212use axum::response::Response;
1313use thiserror::Error;
14141515-use super::admin_errors::AdminImportRsvpError;
1615use super::common_error::CommonError;
1716use super::create_event_errors::CreateEventError;
1817use super::edit_event_error::EditEventError;
···9089 /// different formats or systems.
9190 #[error(transparent)]
9291 MigrateRsvp(#[from] MigrateRsvpError),
9393-9494- /// Admin RSVP import errors.
9595- ///
9696- /// This error occurs when administrators have issues importing RSVP
9797- /// records into the system.
9898- #[error(transparent)]
9999- AdminImportRsvp(#[from] AdminImportRsvpError),
1009210193 /// Cache operation errors.
10294 ///