i18n+filtering fork - fluent-templates v2
at main 29 lines 1.2 kB view raw
1use thiserror::Error; 2 3/// Represents errors that can occur when viewing specific events. 4/// 5/// These errors typically happen when retrieving or displaying specific 6/// event data, including lookup failures and data enhancement issues. 7#[derive(Debug, Error)] 8pub enum ViewEventError { 9 /// Error when a requested event cannot be found. 10 /// 11 /// This error occurs when attempting to view an event that doesn't 12 /// exist in the system, typically due to an invalid identifier. 13 #[error("error-view-event-1 Event not found: {0}")] 14 EventNotFound(String), 15 16 /// Error when a fallback retrieval method fails. 17 /// 18 /// This error occurs when the primary method of retrieving an event fails, 19 /// and the fallback method also fails to retrieve the event. 20 #[error("error-view-event-2 Failed to get event from fallback: {0}")] 21 FallbackFailed(String), 22 23 /// Error when fetching event details fails. 24 /// 25 /// This error occurs when the system fails to retrieve additional 26 /// details for an event, such as RSVP counts or related data. 27 #[error("error-view-event-3 Failed to fetch event details: {0}")] 28 FetchEventDetailsFailed(String), 29}