diff options
| author | Gus Power <gus@infinitesidequests.com> | 2025-05-22 16:21:05 +0100 |
|---|---|---|
| committer | Gus Power <gus@infinitesidequests.com> | 2025-05-22 16:21:05 +0100 |
| commit | 3e5aa28345bb009c12b5a55f2e7174957bf4ed9a (patch) | |
| tree | fa9044d9e72e213aed22d1761a2bf01a439a0550 /src/error.rs | |
| parent | e417f3afd13fa770a3b64d604bb1686ed6a77203 (diff) | |
started on arbitrary http endpoint configuration
Diffstat (limited to 'src/error.rs')
| -rw-r--r-- | src/error.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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) } |
