generated from phundrak/rust-poem-openapi-template
15 lines
342 B
Rust
15 lines
342 B
Rust
|
use thiserror::Error;
|
||
|
|
||
|
#[allow(dead_code)]
|
||
|
#[derive(Debug, Error)]
|
||
|
pub enum ApiError {
|
||
|
#[error("SQL error: {0}")]
|
||
|
Sql(#[from] gejdr_core::sqlx::Error),
|
||
|
#[error("OAuth token error: {0}")]
|
||
|
TokenError(String),
|
||
|
#[error("Unauthorized")]
|
||
|
Unauthorized,
|
||
|
#[error("Attempted to get a value, none found")]
|
||
|
OptionError,
|
||
|
}
|