Improve error message for UnknownToken on login (#514)
This commit is contained in:
@@ -1043,7 +1043,7 @@ async fn run(settings: ApplicationSettings) -> IambResult<()> {
|
|||||||
match res {
|
match res {
|
||||||
Err(UIError::Application(IambError::Matrix(e))) => {
|
Err(UIError::Application(IambError::Matrix(e))) => {
|
||||||
if let Some(ErrorKind::UnknownToken { .. }) = e.client_api_error_kind() {
|
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 {
|
} else {
|
||||||
print_exit(e)
|
print_exit(e)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user