Better error message.

This commit is contained in:
Antoine Nguyen
2026-02-24 11:37:14 +01:00
parent 0359bb1b87
commit 87fd426244
2 changed files with 2 additions and 1 deletions
@@ -436,7 +436,6 @@ watch(
if (!route.query.uid) { if (!route.query.uid) {
const args = const args =
route.query.mailbox === constants.DRAFTS_FOLDER ? [route.query.mailid] : [] route.query.mailbox === constants.DRAFTS_FOLDER ? [route.query.mailid] : []
console.log(args)
api.createComposeSession(...args).then((resp) => { api.createComposeSession(...args).then((resp) => {
const query = { ...route.query, uid: resp.data.uid } const query = { ...route.query, uid: resp.data.uid }
attachmentCount.value = resp.data.attachments?.length || 0 attachmentCount.value = resp.data.attachments?.length || 0
+2
View File
@@ -783,6 +783,8 @@ class IMAPconnector:
bcmd = "BODY.PEEK" if readonly else "BODY" bcmd = "BODY.PEEK" if readonly else "BODY"
to_fetch = f"(BODYSTRUCTURE {bcmd}[HEADER.FIELDS ({what})])" to_fetch = f"(BODYSTRUCTURE {bcmd}[HEADER.FIELDS ({what})])"
data = self._cmd("FETCH", mailid, to_fetch) data = self._cmd("FETCH", mailid, to_fetch)
if int(mailid) not in data:
raise ImapError(f"Message with UID {mailid} not found in {mbox} folder")
return data[int(mailid)] return data[int(mailid)]