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
use prost::DecodeError;
use thiserror::Error;

#[derive(Error, Debug)]
pub enum Error {
    #[error("Failed to parse uuid {0}")]
    ParseUuidError(#[from] uuid::Error),

    #[error("No operation found")]
    NoOperationFound,

    #[error("Invalid status found")]
    InvalidStatus,

    #[error("Version cannot be found in headers")]
    VersionNotFoundInHeaders,

    #[error("Invalid version")]
    InvalidVersion,

    #[error("Failed to decode port forwarding msg {0}")]
    FailedToDecodePortForwardingMsg(#[from] DecodeError),

    #[error("Payload is invalid or does not exist")]
    InvalidPayload,
}