//! Provides the list of errors for `cfsignal`. use snafu::Snafu; use std::path::PathBuf; pub type Result = std::result::Result; #[derive(Debug, Snafu)] #[snafu(visibility(pub(super)))] pub enum Error { #[snafu(display("Command '{}' with args '{:?}' failed: {}", command, args, source))] Command { command: String, args: Vec, source: std::io::Error, }, #[snafu(display("Failed to parse config file {}: {}", path.display(), source))] ConfigParse { path: PathBuf, source: toml::de::Error, }, #[snafu(display("Failed to read config file {}: {}", path.display(), source))] ConfigRead { path: PathBuf, source: std::io::Error, }, #[snafu(display("IMDS request failed: {}", source))] ImdsRequest { source: imdsclient::Error }, #[snafu(display("IMDS request failed: No '{}' found", what))] ImdsNone { what: String }, #[snafu(display("SignalResource request failed: {}", source))] SignalResource { source: aws_sdk_cloudformation::types::SdkError< aws_sdk_cloudformation::error::SignalResourceError, >, }, }