//! Error types for [`DeezerClient`]. use crate::client::DeezerError; /// Error type for [`DeezerClient`]. #[derive(Debug, thiserror::Error)] pub enum DeezerClientError { /// Failed to send a HTTP request. #[error("Failed to send HTTP request")] SendRequestFailed(#[from] hyper::Error), /// Failed to parse a response from the Deezer API. #[error("Failed to parse response from the Deezer API")] ParseResponseFailed(#[from] serde_json::Error), /// Received a error response from the Deezer API. #[error("Received a error response from the Deezer API")] ReceivedErrorResponse(DeezerError), /// Failed to build API endpoint URI. #[error("Failed to build API endpoint URI")] BuildAPIEndpointURIFailed, /// Received a invalid response body from the Deezer API. #[error("Received a invalid response body from the Deezer API")] InvalidResponseBody, }