Skip to content

Commit 1d414fc

Browse files
author
vikasrohit
authored
Merge pull request #120 from topcoder-platform/hotfix/handling_unhandled_error_in_getting_mentioned_user_details
Resolve the promise in case of error for fetching details for mention…
2 parents d3aa503 + 6583bbc commit 1d414fc

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)