From 3e5aa28345bb009c12b5a55f2e7174957bf4ed9a Mon Sep 17 00:00:00 2001 From: Gus Power Date: Thu, 22 May 2025 16:21:05 +0100 Subject: started on arbitrary http endpoint configuration --- src/error.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 429aa58..1ce9482 100644 --- a/src/error.rs +++ b/src/error.rs @@ -14,6 +14,7 @@ pub enum AppError { IoError(io::Error), RequestFailed { url: Url, source: ReqwestError }, InvalidResponse { url: Url, reason: String }, + InvalidHttpHeader(String), UnableToGetHomeDirectory(GetHomeError), } @@ -33,7 +34,8 @@ impl fmt::Display for AppError { Self::RequestFailed { url, .. } => write!(f, "Request to {} failed", url), Self::InvalidResponse { url, reason } => { write!(f, "Invalid response from {}: {}", url, reason) - } + }, + Self::InvalidHttpHeader(message) => write!(f, "Invalid HTTP header configuration: {}", message), Self::UnableToGetHomeDirectory(err) => { write!(f, "Failed to get home directory: {}", err) } -- cgit v1.2.3