Skip to content

Commit 6583bbc

Browse files
author
Vikas Agarwal
committed
Resolve the promise in case of error for fetching details for mentioned user to avoid skipping of notifications to other users
1 parent c8f6782 commit 6583bbc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

connect/connectNotificationServer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,12 @@ const getNotificationsForMentionedUser = (logger, eventConfig, content) => {
9696
});
9797
resolve(notifications);
9898
}).catch((error) => {
99-
console.log(error, 'error');
10099
if (logger) {
101100
logger.error(error);
101+
logger.info('Unable to send notification to mentioned user')
102102
}
103-
reject(new Error('Unable to fetch details for mentioned user in the message.'));
103+
//resolves with empty notification which essentially means we are unable to send notification to mentioned user
104+
resolve([]);
104105
});
105106
} else {
106107
resolve([]);

0 commit comments

Comments
 (0)