18 lines
435 B
Rust
18 lines
435 B
Rust
|
#[derive(Debug, thiserror::Error, Clone)]
|
||
|
pub enum Error {
|
||
|
#[error("Failed to handle a server response: {0}")]
|
||
|
BadResponse(String),
|
||
|
|
||
|
#[error("Failed to communicate with the host")]
|
||
|
ConnectionError,
|
||
|
|
||
|
#[error("Failed to authorize the session with the given token")]
|
||
|
InvalidToken,
|
||
|
|
||
|
#[error("The token used to authenticate the session is expired")]
|
||
|
TokenExpired,
|
||
|
|
||
|
#[error("{0}")]
|
||
|
Unknown(String),
|
||
|
}
|