chiark
/
gitweb
/
~ian
/
mastodonochrome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfe8850
)
Fix misreporting of HTTP errors not about auth.
author
Simon Tatham
<anakin@pobox.com>
Sun, 31 Dec 2023 14:01:00 +0000
(14:01 +0000)
committer
Simon Tatham
<anakin@pobox.com>
Sun, 31 Dec 2023 14:06:32 +0000
(14:06 +0000)
The prefix "unable to read authentication" was in the wrong part of my
error handling edifice.
src/tui.rs
patch
|
blob
|
history
diff --git
a/src/tui.rs
b/src/tui.rs
index 5a17b816431e87fbbd8a43df9350fedfec57acae..4b8ad00dfb628ea9349f7d65b32d92c9d69e1835 100644
(file)
--- a/
src/tui.rs
+++ b/
src/tui.rs
@@
-172,7
+172,7
@@
impl From<std::io::Error> for TuiError {
impl From<AuthError> 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)
}
}