use crate::RefreshError;
use thiserror::Error;
#[derive(Error, Debug)]
#[error(transparent)]
#[non_exhaustive]
pub enum ApiError {
#[error("An error occurred with the request sent to the Hive API: {0}")]
RequestError(#[from] reqwest::Error),
#[error("An error occurred while decoding the response from the Hive API: {0}")]
InvalidResponse(#[from] serde_json::Error),
#[error("An error occurred while trying to refresh the authentication tokens")]
RefreshError(#[from] RefreshError),
}