1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::error::Error;
use std::fmt;

#[derive(Debug)]
pub struct APIError {
    pub message: String,
}

impl fmt::Display for APIError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "APIError: {}", self.message)
    }
}

impl Error for APIError {}