Improve error message for UnknownToken on login (#514)

This commit is contained in:
vaw
2025-10-25 20:53:47 +00:00
committed by GitHub
parent e021d4a55d
commit 28fea03625

View File

@@ -1043,7 +1043,7 @@ async fn run(settings: ApplicationSettings) -> IambResult<()> {
match res {
Err(UIError::Application(IambError::Matrix(e))) => {
if let Some(ErrorKind::UnknownToken { .. }) = e.client_api_error_kind() {
print_exit("Server did not recognize our API token; did you log out from this session elsewhere?")
print_exit(format!("Server did not recognize our API token; did you log out from this session elsewhere?\nTry deleting `{}` to force a clean login.", settings.session_json.display()))
} else {
print_exit(e)
}