Public declaration syntax from forge-rs/crates/forge-wasm/src/error.rs Original source SHA-256: 5741229b505f64d84b42c9d803deea4a71010c86c578dc8143b5583cf7d2cbd0 Function bodies and constant values are omitted. This is not the complete implementation. Source line 35 #[derive(Debug, Error)] pub enum ForgeWasmError { /// JSON serialization failed when converting a Rust type to JSON output. /// /// This indicates a bug in the WASM export layer if it occurs, since /// all output types derive `Serialize`. #[error("JSON serialization error: {0}")] Serialization(String), /// JSON deserialization failed when parsing input from the calling language. /// /// The calling SDK sent malformed JSON. The error message includes the /// serde parse error for debugging. #[error("JSON deserialization error: {0}")] Deserialization(String), /// An identity operation failed in the underlying `forge-identity` or `oas-sdk` layer. /// /// This wraps errors from HMR creation, agent derivation, and related /// identity workflows. #[error("identity operation failed: {0}")] Identity(String), /// An authorization operation failed in the underlying `forge-auth` layer. /// /// This wraps errors from Arsenal ACT verification and capability checks. #[error("auth operation failed: {0}")] Auth(String), /// The input provided to a WASM export function is structurally invalid. /// /// Examples: empty namespace, invalid hex string, wrong key length. #[error("invalid input: {0}")] InvalidInput(String), } Source line 81 pub type ForgeWasmResult = Result;