vigil_ui_protocol/
error.rs1use serde::{Deserialize, Serialize};
4use thiserror::Error;
5
6#[derive(Debug, Clone, Error, Serialize, Deserialize, PartialEq, Eq)]
9#[serde(tag = "kind", content = "detail")]
10#[non_exhaustive]
11pub enum UiError {
12 #[error("not_found: {0}")]
14 NotFound(String),
15 #[error("invalid: {0}")]
17 Invalid(&'static str),
18 #[error("capability_denied: required={required}")]
20 CapabilityDenied {
21 required: &'static str,
23 },
24 #[error("ledger_error: {reason_code}")]
26 LedgerError {
27 reason_code: &'static str,
29 },
30 #[error("secret_in_argv: server={server_id} rule={rule}")]
32 SecretInArgv {
33 server_id: String,
35 rule: &'static str,
37 },
38 #[error("profile_serialize_failed")]
40 ProfileSerializeFailed,
41}