fix: substitute variables in STATUS error logs

This commit is contained in:
link2xt
2023-11-15 09:51:54 +00:00
parent 890a2bcc15
commit 0f36197c54
2 changed files with 3 additions and 3 deletions

View File

@@ -619,11 +619,11 @@ impl Imap {
.inner .inner
.status(folder, "(UIDNEXT)") .status(folder, "(UIDNEXT)")
.await .await
.context("STATUS (UIDNEXT) error for {folder:?}")?; .with_context(|| format!("STATUS (UIDNEXT) error for {folder:?}"))?;
status status
.uid_next .uid_next
.context("STATUS {folder} (UIDNEXT) did not return UIDNEXT")? .with_context(|| format!("STATUS {folder} (UIDNEXT) did not return UIDNEXT"))?
}; };
mailbox.uid_next = Some(new_uid_next); mailbox.uid_next = Some(new_uid_next);

View File

@@ -35,7 +35,7 @@ impl Session {
let status = self let status = self
.status(folder, "(UIDNEXT)") .status(folder, "(UIDNEXT)")
.await .await
.context("STATUS (UIDNEXT) error for {folder:?}")?; .with_context(|| format!("STATUS (UIDNEXT) error for {folder:?}"))?;
if let Some(uid_next) = status.uid_next { if let Some(uid_next) = status.uid_next {
let expected_uid_next = get_uid_next(context, folder) let expected_uid_next = get_uid_next(context, folder)
.await .await