use thiserror::Error;

#[derive(Debug, Error)]
pub enum ControllerError {
    #[error("NATS error: {0}")]
    Nats(String),
    #[error("JWT validation failed: {0}")]
    Auth(String),
    #[error("persistence error: {0}")]
    Db(String),
    #[error("orchestrator API error: {0}")]
    Orchestrator(String),
    #[error("json error: {0}")]
    Json(#[from] serde_json::Error),
    #[error("io error: {0}")]
    Io(#[from] std::io::Error),
    #[error("duplicate jti '{0}' — already applied")]
    DuplicateJti(String),
}
