use thiserror::Error;
#[derive(Debug, Error)]
pub enum SdkError {
#[error("rune '{0}' is already registered")]
DuplicateRune(String),
#[error("stream already ended")]
StreamEnded,
#[error("transport error: {0}")]
Transport(#[from] tonic::transport::Error),
#[error("grpc error: {0}")]
Grpc(#[from] tonic::Status),
#[error("channel send error: {0}")]
ChannelSend(String),
#[error("handler error: {0}")]
HandlerError(String),
#[error("invalid uri: {0}")]
InvalidUri(String),
#[error("attach rejected: {0}")]
AttachRejected(String),
#[error("{0}")]
Other(String),
}
pub type SdkResult<T> = Result<T, SdkError>;