sentinelpass_protocol/error.rs
1//! Protocol-level errors.
2
3use thiserror::Error;
4
5/// Errors returned by protocol operations (client I/O, token management,
6/// frame crypto).
7#[derive(Error, Debug)]
8pub enum ProtocolError {
9 #[error("I/O error: {0}")]
10 Io(#[from] std::io::Error),
11
12 #[error("IPC error: {0}")]
13 Ipc(String),
14
15 /// The daemon rejected an application-service call with a typed error
16 /// (WBS-408): (code, message).
17 #[error("service error [{0}]: {1}")]
18 Service(String, String),
19}