Something went wrong. Try again.
The smokesignal.events web application forked from smokesignal.events/smokesignal
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657use thiserror::Error;
/// Represents errors that can occur during event editing operations.////// These errors typically happen when users attempt to modify existing events/// and encounter authorization, validation, or type compatibility issues.#[derive(Debug, Error)]pub(crate) enum EditEventError { /// Error when a user is not authorized to edit an event. /// /// This error occurs when a user attempts to edit an event that they /// do not have permission to modify, typically because they are not /// the event creator or an administrator. #[error("error-smokesignal-edit-event-1 Not authorized to edit this event")] NotAuthorized,
/// Error when attempting to edit an unsupported event type. /// /// This error occurs when a user attempts to edit an event type that /// does not support editing, as only community calendar events can be /// modified after creation. #[error( "error-smokesignal-edit-event-2 Unsupported event type. Only community calendar events can be edited" )] UnsupportedEventType,
/// Error when attempting to edit location data on an event that has multiple locations. /// /// This error occurs when a user attempts to modify location information for an event /// that has multiple locations defined. Such events can only be edited through the API. #[error("error-smokesignal-edit-event-3 Cannot edit locations: Event has multiple locations")] MultipleLocationsPresent,
/// Error when attempting to edit location data on an event that has an unsupported location type. /// /// This error occurs when a user attempts to modify location information for an event /// that has a location type that is not supported for editing through the web interface. #[error( "error-smokesignal-edit-event-4 Cannot edit locations: Event has unsupported location type" )] UnsupportedLocationType,
/// Error when the AT Protocol server returns an error response. /// /// This error occurs when the PDS or other AT Protocol service /// returns an error response during event record editing. #[error("error-smokesignal-edit-event-5 Server error: {message}")] ServerError { message: String },
/// Error when the header image blob cannot be constructed. /// /// This error occurs when the provided header CID cannot be /// used to construct a valid TypedBlob for the event media. #[error("error-smokesignal-edit-event-6 Invalid header blob: {0}")] InvalidHeaderBlob(String),}