1#[derive(Debug, thiserror::Error)]
2pub enum SdkError {
3 #[error("connection failed: {0}")]
4 Connection(String),
5
6 #[error("authentication failed")]
7 Auth,
8
9 #[error("session expired")]
10 SessionExpired,
11
12 #[error("changeset not found: {0}")]
13 ChangesetNotFound(String),
14
15 #[error("verification failed: {0}")]
16 VerificationFailed(String),
17
18 #[error("merge conflict: {0}")]
19 Conflict(String),
20
21 #[error("server error: {0}")]
22 Server(#[from] tonic::Status),
23
24 #[error("transport error: {0}")]
25 Transport(#[from] tonic::transport::Error),
26}
27
28pub type Result<T> = std::result::Result<T, SdkError>;