From 540edf3a9ad611eb989986e057451e2f595b8c22 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 24 Jan 2024 08:48:11 +0000 Subject: [PATCH] Change the message for AuthError::Nonexistent. "Not logged in" used to be correct, when we didn't support account registration. But now the auth file can _exist_ while still being logged in. So we should be more precise in the translation of this error code: it really means /auth is absent in an ENOENT sort of way. However, we shouldn't normally _see_ that message: it's one of the few error cases that we detect programmatically and divert into a handler for (to wit, the login flow). --- src/auth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth.rs b/src/auth.rs index e98f24c..78a174d 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -17,7 +17,7 @@ impl std::fmt::Display for AuthError { ) -> Result<(), std::fmt::Error> { match self { AuthError::Nonexistent(_) => { - write!(f, "not logged in") + write!(f, "no saved authentication file") } AuthError::Bad(ref msg) => { write!(f, "unable to read authentication: {}", msg) -- 2.30.2