24 lines
577 B
Rust
24 lines
577 B
Rust
#[derive(Debug, thiserror::Error, Clone)]
|
|
pub enum Error {
|
|
#[error("Failed to authenticate with the given password")]
|
|
WrongPassword,
|
|
|
|
#[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),
|
|
|
|
#[error("The user was not found.")]
|
|
UserNotFound,
|
|
}
|