"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 <cfgdir>/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).
) -> 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)