Skip to main content

rustack_core/
error.rs

1//! Error types for the Rustack core.
2
3/// Core error type for Rustack infrastructure.
4#[derive(Debug, thiserror::Error)]
5pub enum RustackError {
6    /// Invalid AWS account ID format.
7    #[error("invalid AWS account ID: {0} (must be 12-digit numeric string)")]
8    InvalidAccountId(String),
9
10    /// Configuration error.
11    #[error("configuration error: {0}")]
12    Config(String),
13
14    /// Internal error with context.
15    #[error(transparent)]
16    Internal(#[from] anyhow::Error),
17}
18
19/// Convenience result type for Rustack operations.
20pub type RustackResult<T> = Result<T, RustackError>;