ddapi_rs/
error.rs

1use std::fmt;
2
3#[derive(Clone, Debug)]
4pub enum ApiError {
5    NotFound,
6}
7
8impl fmt::Display for ApiError {
9    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
10        match self {
11            ApiError::NotFound => write!(f, "Player not found"),
12        }
13    }
14}
15
16impl std::error::Error for ApiError {}