//! Error types for the Ramjet service. //! //! All errors follow the convention: `error-ramjet-{domain}-{number} {message}: {details}` /// Top-level error type for Ramjet operations. #[derive(Debug, thiserror::Error)] pub enum RamjetError { /// Fjall storage engine error. #[error("error-ramjet-storage-1 fjall operation failed: {0}")] Fjall(#[from] fjall::Error), /// Key encoding or decoding error. #[error("error-ramjet-storage-2 key encoding failed: {reason}")] KeyEncoding { /// Description of the encoding failure. reason: String, }, /// Value encoding or decoding error. #[error("error-ramjet-storage-3 value decoding failed: {reason}")] ValueDecoding { /// Description of the decoding failure. reason: String, }, /// Invalid configuration. #[error("error-ramjet-config-1 invalid configuration: {reason}")] Config { /// Description of the configuration error. reason: String, }, /// HTTP server error. #[error("error-ramjet-server-1 server error: {reason}")] Server { /// Description of the server error. reason: String, }, /// Pipeline processing error. #[error("error-ramjet-pipeline-1 pipeline error: {reason}")] Pipeline { /// Description of the pipeline error. reason: String, }, /// I/O error. #[error("error-ramjet-io-1 I/O error: {0}")] Io(#[from] std::io::Error), /// Failed to load zstd dictionary file. #[error("error-ramjet-storage-4 failed to load zstd dictionary at {path}: {source}")] DictLoad { /// Path to the dictionary file. path: std::path::PathBuf, /// Underlying I/O error. source: std::io::Error, }, /// QUIC transport error. #[error("error-ramjet-quic-1 QUIC error: {reason}")] Quic { /// Description of the QUIC error. reason: String, }, }