mirror of
https://github.com/kristoferssolo/echoes-of-ascension.git
synced 2025-10-21 18:50:34 +00:00
23 lines
475 B
Rust
23 lines
475 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub enum UserError {
|
|
#[error("Username validation failed: {0}")]
|
|
UsernameValidation(String),
|
|
|
|
#[error("Code hashing failed: {0}")]
|
|
HashingError(String),
|
|
|
|
#[error("Username already taken: {0}")]
|
|
UsernameTaken(String),
|
|
|
|
#[error("Invalid code format")]
|
|
InvalidCode,
|
|
|
|
#[error("Authentication failed")]
|
|
AuthenticationFailed,
|
|
|
|
#[error("Internal server error: {0}")]
|
|
Internal(String),
|
|
}
|