The smokesignal.events web application
at main 29 lines 1.2 kB view raw
1use thiserror::Error; 2 3/// Represents errors that can occur during event viewing operations. 4/// 5/// These errors typically happen when retrieving and displaying event data 6/// to users, including data validation and enhancement issues. 7#[derive(Debug, Error)] 8pub(crate) enum EventViewError { 9 /// Error when an invalid collection is specified. 10 /// 11 /// This error occurs when an event view request specifies a collection 12 /// name that doesn't exist or isn't supported by the system. 13 #[error("error-smokesignal-event-view-1 Invalid collection: {0}")] 14 InvalidCollection(String), 15 16 /// Error when an event name is missing. 17 /// 18 /// This error occurs when attempting to view an event that is missing 19 /// a required name field, which is necessary for display. 20 #[error("error-smokesignal-event-view-2 Event name is missing")] 21 MissingEventName, 22 23 /// Error when RSVP count calculation fails. 24 /// 25 /// This error occurs when the system fails to retrieve or calculate 26 /// the RSVP counts (going, interested, not going) for an event. 27 #[error("error-smokesignal-event-view-3 Failed to hydrate event RSVP counts: {0}")] 28 FailedToHydrateRsvpCounts(String), 29}