rsiot/components/cmp_auth/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use hmac::digest::InvalidLength;

/// Ошибки cmp_auth
#[derive(Debug, thiserror::Error)]
pub enum Error {
    /// TokioTaskJoinError
    #[error("TokioTaskJoinError: {0}")]
    TokioTaskJoinError(#[from] tokio::task::JoinError),

    /// CmpOutput
    #[error("CmpOutput: {0}")]
    CmpOutput(crate::executor::ComponentError),

    /// ProcessRequest
    #[error("ProcessRequest: {0}")]
    ProcessRequest(String),

    /// Hmac error
    #[error("Hmac error: {0}")]
    Hmac(#[from] InvalidLength),

    /// Jwt error
    #[error("Jwt error: {0}")]
    Jwt(#[from] jwt::Error),
}