pub enum DomainError {
NotFound {
entity: &'static str,
id: Uuid,
},
NotFoundByName {
entity: &'static str,
name: String,
available: Vec<String>,
},
Ambiguous {
entity: &'static str,
name: String,
matches: Vec<AmbiguousMatch>,
},
BatchResolutionFailed {
entity: &'static str,
failures: Vec<BatchResolutionFailure>,
},
Validation(String),
Dependency(DependencyError),
WipLimitExceeded {
column_id: Uuid,
limit: u32,
},
SprintBoardMismatch {
sprint_id: Uuid,
sprint_board: Uuid,
card_board: Uuid,
},
}Variants§
NotFound
entity is rendered as a sentence-leading noun (e.g. "Card",
"Sprint"). All call sites of KanbanError::not_found(entity, id)
must pass a capitalized noun so the rendered message reads
"Card <uuid> not found", matching the sibling NotFoundByName
convention. See KAN-659 for the normalization history.
NotFoundByName
Returned when a name- or identifier-based lookup misses. The available
vector is appended to the message so users see what they could have typed.
entity follows the same capitalized-noun convention as
NotFound.
Ambiguous
Returned when a name- or identifier-based lookup matches more than one entity. Each match carries both a human-readable label and a UUID so users can disambiguate by either.
BatchResolutionFailed
Returned by batch resolvers (resolve_card_ids, future siblings) when
one or more inputs in the batch couldn’t be resolved. Carries per-input
typed causes so callers can introspect.
Validation(String)
Dependency(DependencyError)
WipLimitExceeded
SprintBoardMismatch
Implementations§
Source§impl DomainError
impl DomainError
pub fn wip_limit_exceeded(column_id: Uuid, limit: u32) -> Self
Trait Implementations§
Source§impl Debug for DomainError
impl Debug for DomainError
Source§impl Display for DomainError
impl Display for DomainError
Source§impl Error for DomainError
impl Error for DomainError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()