use http::StatusCode;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum ApiError {
#[error("Missing field in json response: {0}")]
MissingFieldError(&'static str),
#[error("Cannot convert field {0} to type {1}")]
InvalidTypeError(&'static str, &'static str),
#[error("Not authenticated")]
NotAuthenticatedError(StatusCode),
}