From c5108e4eee89392044cc703926a3db8704e3bd97 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 31 Dec 2023 14:01:00 +0000 Subject: [PATCH] Fix misreporting of HTTP errors not about auth. The prefix "unable to read authentication" was in the wrong part of my error handling edifice. --- src/tui.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tui.rs b/src/tui.rs index 5a17b81..4b8ad00 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -172,7 +172,7 @@ impl From for TuiError { impl From for TuiError { fn from(err: AuthError) -> Self { TuiError { - message: err.to_string(), + message: format!("unable to read authentication: {}", err), } } } @@ -188,7 +188,7 @@ impl std::fmt::Display for TuiError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { - write!(f, "unable to read authentication: {}", self.message) + write!(f, "{}", self.message) } } -- 2.30.2