use reqwest::header::InvalidHeaderValue; use reqwest::Error; #[derive(Debug)] pub struct GeneralError { pub description: String, } impl From for GeneralError { fn from(_value: InvalidHeaderValue) -> Self { GeneralError { description: "Unable to convert the token into header value".to_string(), } } } impl From for GeneralError { fn from(value: Error) -> Self { GeneralError { description: format!("Unable to perform a request: {}", value.to_string()), } } }