//! # brokers/error.rs — Broker Error Types //! //! Defines the error type for all broker task operations in BEDS. //! //! ## Calling Agents //! - `brokers::r_broker` — returned from spawn and consume operations //! - `brokers::mod` — surfaced from pool management //! //! **Author:** mks //! **Version:** 1.0 //! //! ## History //! * `2026-04-05` - mks - original coding /// Errors that can occur in any BEDS broker task. /// /// AMQP protocol errors are wrapped transparently via the `From` impl. /// Additional variants cover broker-specific failure modes. /// /// # History /// /// * `2026-04-05` - mks - original coding #[derive(Debug, thiserror::Error)] pub enum BrokerError { #[error("AMQP protocol error: {0}")] Protocol(#[from] lapin::Error), #[error("Broker task '{0}' failed to start: {1}")] StartupFailed(String, String), #[error("Message decode error in broker '{0}': {1}")] DecodeFailed(String, String), }