openzeppelin_relayer/config/
error.rs1use thiserror::Error;
5
6#[derive(Error, Debug)]
7pub enum ConfigFileError {
8 #[error("Invalid ID length: {0}")]
9 InvalidIdLength(String),
10 #[error("Invalid ID format: {0}")]
11 InvalidIdFormat(String),
12 #[error("Missing required field: {0}")]
13 MissingField(String),
14 #[error("IO error: {0}")]
15 IoError(#[from] std::io::Error),
16 #[error("JSON error: {0}")]
17 JsonError(#[from] serde_json::Error),
18 #[error("Duplicate id error: {0}")]
19 DuplicateId(String),
20 #[error("Invalid network type: {0}")]
21 InvalidNetworkType(String),
22 #[error("Invalid network name for {network_type}: {name}")]
23 InvalidNetwork { network_type: String, name: String },
24 #[error("Invalid policy: {0}")]
25 InvalidPolicy(String),
26 #[error("Internal error: {0}")]
27 InternalError(String),
28 #[error("Missing env var: {0}")]
29 MissingEnvVar(String),
30 #[error("Invalid format: {0}")]
31 InvalidFormat(String),
32 #[error("File not found: {0}")]
33 FileNotFound(String),
34 #[error("Invalid reference: {0}")]
35 InvalidReference(String),
36 #[error("File read error: {0}")]
37 FileRead(String),
38 #[error("Test Signer error: {0}")]
39 TestSigner(String),
40 #[error("Incompatible inheritance type: {0}")]
41 IncompatibleInheritanceType(String),
42 #[error("Circular inheritance detected: {0}")]
43 CircularInheritance(String),
44 #[error("Maximum inheritance depth exceeded: {0}")]
45 MaxInheritanceDepthExceeded(String),
46 #[error("Invalid operation: {0}")]
47 InvalidOperation(String),
48 #[error("Invalid timeout: {0}")]
49 InvalidTimeout(u64),
50}