boundary_compiler/
error.rs1use thiserror::Error;
4
5#[derive(Debug, Error)]
7pub enum JcsError {
8 #[error("duplicate object key: {key:?}")]
10 DuplicateKey { key: String },
11
12 #[error("invalid JSON: {reason}")]
14 InvalidJson { reason: String },
15
16 #[error("JSON parse error: {0}")]
18 ParseError(#[from] serde_json::Error),
19
20 #[error("schema validation failed: {0}")]
22 SchemaValidation(String),
23
24 #[error("JSON Schema error: {0}")]
26 SchemaError(String),
27
28 #[error("digest error: {0}")]
30 DigestError(String),
31
32 #[error("invalid profile: {reason}")]
34 InvalidProfile { reason: String },
35
36 #[error("resource ceiling exceeded: {resource} ({used} / {limit})")]
38 ResourceCeilingExceeded {
39 resource: String,
40 used: usize,
41 limit: usize,
42 },
43}