Skip to content

Commit ec4e159

Browse files
committed
fixed another fullmsg call. improved error messages
1 parent cfe149e commit ec4e159

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

js/mzsam-moving-engine.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,13 @@ export class movingEngine {
275275
async findRelatedMessage(message, account_id = 0){
276276

277277
this.logger.log("calling findRelatedMessage method for message [" + message.headerMessageId + "] [" + message.subject + "] [" + samUtils.formatDateString(message.date) + "]");
278-
let fullMsg = await messenger.messages.getFull(message.id);
278+
let fullMsg = null
279+
try{
280+
fullMsg = await messenger.messages.getFull(message.id);
281+
}catch(e){
282+
this.logger.log("Error getting the full original message, stopping: " + e);
283+
return false;
284+
}
279285
// console.log(">>>>>>>>>>>> fullMsg: " + JSON.stringify(fullMsg.headers));
280286
let inReplyToHeaders = fullMsg.headers['in-reply-to'];
281287
this.logger.log("inReplyToHeaders: " + inReplyToHeaders);
@@ -390,7 +396,7 @@ export class movingEngine {
390396
try{
391397
fullFoundMsg = await messenger.messages.getFull(found_msg.id);
392398
}catch(e){
393-
this.logger.log("Error getting full message, skipping: " + e);
399+
this.logger.log("Error getting the full message when searching for related messages, skipping: " + e);
394400
continue;
395401
}
396402
// console.log(">>>>>>>>>>>>>> fullFoundMsg.headers: " + JSON.stringify(fullFoundMsg.headers));

0 commit comments

Comments
 (0)