Commit 28fea03625

28fea0362570e2a58632a0539b4943274506fb12

parent: e021d4a55d

Unregistered key

vaw <git@nlih.de> · 2025-10-25 20:53 UTC
committer: <noreply@github.com>

Improve error message for `UnknownToken` on login (#514)

Layout: unified · split

src/main.rs +1 −1
@@ -1043,7 +1043,7 @@ async fn run(settings: ApplicationSettings) -> IambResult<()> {
1043 match res { 1043 match res {
1044 Err(UIError::Application(IambError::Matrix(e))) => { 1044 Err(UIError::Application(IambError::Matrix(e))) => {
1045 if let Some(ErrorKind::UnknownToken { .. }) = e.client_api_error_kind() { 1045 if let Some(ErrorKind::UnknownToken { .. }) = e.client_api_error_kind() {
1046 print_exit("Server did not recognize our API token; did you log out from this session elsewhere?") 1046 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()))
1047 } else { 1047 } else {
1048 print_exit(e) 1048 print_exit(e)
1049 } 1049 }