pub enum VibeTicketError {
Show 29 variants
Io(Error),
Yaml(Error),
Json(Error),
Git(Error),
Config(ConfigError),
TicketNotFound {
id: String,
},
TaskNotFound {
id: String,
},
InvalidStatus {
status: String,
},
InvalidPriority {
priority: String,
},
ProjectNotInitialized,
TemplateNotFound(String),
MissingRequiredField(String),
NoTicketsFound,
ProjectAlreadyInitialized {
path: PathBuf,
},
NoActiveTicket,
MultipleActiveTickets,
InvalidSlug {
slug: String,
},
DuplicateTicket {
slug: String,
},
FileOperation {
path: PathBuf,
message: String,
},
PermissionDenied {
message: String,
},
Template(Error),
Dialoguer(Error),
Uuid(Error),
SpecNotFound {
id: String,
},
NoActiveSpec,
InvalidInput(String),
Custom(String),
ParseError(String),
SerializationError(String),
}Expand description
Main error type for vibe-ticket
This enum represents all possible errors that can occur in the application. Using thiserror for automatic Error trait implementation.
Variants§
Io(Error)
I/O related errors
Yaml(Error)
YAML serialization/deserialization errors
Json(Error)
JSON serialization/deserialization errors
Git(Error)
Git operation errors
Config(ConfigError)
Configuration errors
TicketNotFound
Ticket not found
TaskNotFound
Task not found
InvalidStatus
Invalid ticket status
InvalidPriority
Invalid priority
ProjectNotInitialized
Project not initialized
TemplateNotFound(String)
Template not found
MissingRequiredField(String)
Missing required field in template
NoTicketsFound
No tickets found
ProjectAlreadyInitialized
Project already initialized
NoActiveTicket
No active ticket
MultipleActiveTickets
Multiple active tickets
InvalidSlug
Invalid slug format
DuplicateTicket
Duplicate ticket
FileOperation
File operation error
PermissionDenied
Permission denied
Template(Error)
Template error
Dialoguer(Error)
Dialoguer error (for interactive mode)
Uuid(Error)
UUID parsing error
SpecNotFound
Specification not found
NoActiveSpec
No active specification
InvalidInput(String)
Invalid input
Custom(String)
Generic error with custom message
ParseError(String)
Parse error for data formats
SerializationError(String)
Serialization error for data formats
Implementations§
Source§impl VibeTicketError
impl VibeTicketError
Sourcepub const fn is_recoverable(&self) -> bool
pub const fn is_recoverable(&self) -> bool
Returns true if this error is recoverable
Sourcepub const fn is_config_error(&self) -> bool
pub const fn is_config_error(&self) -> bool
Returns true if this error is a configuration issue
Sourcepub fn user_message(&self) -> String
pub fn user_message(&self) -> String
Returns a user-friendly error message
Sourcepub fn serialization_error(format: &str, error: impl Display) -> Self
pub fn serialization_error(format: &str, error: impl Display) -> Self
Creates a serialization error with consistent formatting
Sourcepub fn deserialization_error(format: &str, error: impl Display) -> Self
pub fn deserialization_error(format: &str, error: impl Display) -> Self
Creates a deserialization error with consistent formatting
Sourcepub fn io_error(operation: &str, path: &Path, error: impl Display) -> Self
pub fn io_error(operation: &str, path: &Path, error: impl Display) -> Self
Creates an I/O error with consistent formatting
Sourcepub fn parse_error(type_name: &str, value: &str, error: impl Display) -> Self
pub fn parse_error(type_name: &str, value: &str, error: impl Display) -> Self
Creates a parsing error with consistent formatting
Sourcepub fn suggestions(&self) -> Vec<String>
pub fn suggestions(&self) -> Vec<String>
Returns suggested actions for the error