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
26
27
28
29
#[derive(Debug, thiserror::Error)]
pub enum PLCError {
    #[error("Http {0}: {1}")]
    Http(u16, String),

    #[error("Misordered operation")]
    MisorderedOperation,

    #[error("Recovery too late")]
    LateRecovery,

    #[error("Signature is invalid")]
    InvalidSignature,

    #[error("Operation is invalid")]
    InvalidOperation,

    #[error("Key is invalid")]
    InvalidKey,

    #[error("Key is malformed")]
    MalformedKey,

    #[error("Reqwest error: {0}")]
    Reqwest(#[from] reqwest::Error),

    #[error(transparent)]
    Other(#[from] anyhow::Error),
}