scroll.server/crates/service-rpc/src/error.rs
WiseDev d25a6de423 move all crates into crates/, glob members
pure move, no code touched. readme and protocol.md paths fixed up.
2026-08-23 08:15:45 +03:00

16 lines
560 B
Rust

pub type RpcResult<T> = Result<T, RpcError>;
#[derive(Debug, thiserror::Error)]
pub enum RpcError {
#[error("transport: {0}")]
Transport(#[from] std::io::Error),
#[error("encoding: {0}")]
Encoding(#[from] serde_json::Error),
#[error("frame of {actual} byte(s) exceeds the {limit} byte limit")]
FrameTooLarge { actual: usize, limit: usize },
#[error("peer closed the connection")]
Closed,
#[error("service rejected the call: {0}")]
Rejected(String),
#[error("service is unavailable: {0}")]
Unavailable(String),
}