minghuaw / fe2o3-amqp

A rust implementation of the AMQP1.0 protocol based on serde and tokio.
MIT License
64 stars 7 forks source link

Display content of `InvalidType` in `fe2o3-amqp-management`'s `Error::DecodeError` #256

Closed minghuaw closed 3 months ago

minghuaw commented 4 months ago

The current error message if printed is not helpful

/// Error type for the management client.
#[derive(Debug, thiserror::Error)]
pub enum Error {
    // ...

    /// Error with decoding from message
    #[error("Error decoding from message")]
    DecodeError(Option<InvalidType>),

    // ...
}