human_friendly_ids/
error.rs

1// src/error.rs
2//! Error types for user-friendly ID operations
3
4use thiserror::Error;
5
6#[derive(Error, Debug, PartialEq, Eq, Clone)]
7pub enum IdError {
8    #[error("Invalid character in ID")]
9    InvalidCharacter,
10    #[error("Invalid check bit")]
11    InvalidCheckBit,
12    #[error("ID length too short, minimum 3 characters")]
13    TooShort,
14    #[error("ID length exceeds maximum allowed length")]
15    TooLong,
16    #[error("Invalid sequence in ID")]
17    InvalidSequence,
18}