fix: warn on failed sdk state dir removal in M_UNKNOWN_TOKEN recovery
This commit is contained in:
parent
78db47b00b
commit
7010d06c34
1 changed files with 7 additions and 1 deletions
|
|
@ -86,7 +86,13 @@ async fn main() -> Result<()> {
|
|||
token + sdk state for re-provisioning"
|
||||
);
|
||||
let _ = tokio::fs::remove_file(&token_file).await;
|
||||
let _ = tokio::fs::remove_dir_all(&state_dir).await;
|
||||
if let Err(e) = tokio::fs::remove_dir_all(&state_dir).await {
|
||||
tracing::warn!(
|
||||
path = %state_dir.display(),
|
||||
err = %e,
|
||||
"failed to remove sdk state dir; next startup may fail with stale state"
|
||||
);
|
||||
}
|
||||
return Ok(());
|
||||
}
|
||||
return Err(e.context("build matrix client"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue