fundamentum_portforwarding_proto_rust/
errors.rs1use prost::DecodeError;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum Error {
6 #[error("Failed to parse uuid {0}")]
7 ParseUuidError(#[from] uuid::Error),
8
9 #[error("No operation found")]
10 NoOperationFound,
11
12 #[error("Invalid status found")]
13 InvalidStatus,
14
15 #[error("Version cannot be found in headers")]
16 VersionNotFoundInHeaders,
17
18 #[error("Invalid version")]
19 InvalidVersion,
20
21 #[error("Failed to decode port forwarding msg {0}")]
22 FailedToDecodePortForwardingMsg(#[from] DecodeError),
23
24 #[error("Payload is invalid or does not exist")]
25 InvalidPayload,
26
27 #[error("Trying to serialize a payload into an invalid proto payload")]
28 InvalidTansformation,
29
30 #[error("Cannot decode operation from headers")]
31 InvalidOperation,
32
33 #[error("Cannot decode usid from headers")]
34 InvalidUsid,
35}