Skip to content

Commit b82b726

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 44988f2 commit b82b726

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

connect/connectNotificationServer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ const getNotificationsForMentionedUser = (logger, eventConfig, content) => {
9797
}).catch((error) => {
9898
if (logger) {
9999
logger.error(error);
100+
logger.info('Unable to send notification to mentioned user')
100101
}
101-
reject(new Error('Unable to fetch details for mentioned user in the message.'));
102+
//resolves with empty notification which essentially means we are unable to send notification to mentioned user
103+
resolve([]);
102104
});
103105
} else {
104106
resolve([]);

0 commit comments

Comments
 (0)