mirror of
https://github.com/MedzikUser/HomeDisk.git
synced 2024-08-14 21:46:53 +00:00
20 lines
395 B
Rust
20 lines
395 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize, thiserror::Error)]
|
|
pub enum Error {
|
|
#[error("user not found")]
|
|
UserNotFound,
|
|
|
|
#[error("user already exists")]
|
|
UserAlreadyExists,
|
|
|
|
#[error("generate jwt token")]
|
|
TokenGenerate,
|
|
|
|
#[error("invalid jwt token")]
|
|
InvalidToken,
|
|
|
|
#[error("unknow error")]
|
|
UnknowError(String),
|
|
}
|