1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#[derive(Debug, thiserror::Error, miette::Diagnostic)]
pub enum RangerError {
    #[error("no key matching prefix '{0}'")]
    KeyNotFound(String),
    #[error("ambiguous prefix '{0}' matches multiple keys")]
    AmbiguousPrefix(String),
    #[error("can't move {task_state} task relative to {anchor_state} task")]
    StateMismatch {
        task_state: String,
        anchor_state: String,
    },
    #[error("backlog not found: '{0}'")]
    BacklogNotFound(String),
    #[error(transparent)]
    InvalidState(#[from] crate::models::InvalidStateError),
    #[error("database error: {0}")]
    Db(#[from] sqlx::Error),
    #[error("migration error: {0}")]
    Migrate(#[from] sqlx::migrate::MigrateError),
    #[error("{0}")]
    Usage(String),
    #[error("io error: {0}")]
    Io(#[from] std::io::Error),
}