Skip to content

Commit

Permalink
wrap error with try catch for better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
anyoussefinia committed Dec 13, 2024
1 parent f7b3430 commit 852a8b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/admin/handlers/batchUpdateCognitoUsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ async function processCognitoUsers() {
roleList = externalUser.roleList;
}catch(error) {
noRolesCounter ++
console.log(userEmail + " has no roles")
console.log(userEmail + " has no roles");
}
if (externalUser.roleList && externalUser.roleList.length > 0 && externalUser.roleList[0] != null) {
if (roleList && roleList.length > 0 && roleList[0] != null) {
roles = externalUser.roleList.map(role => role.role);
hasRolesCounter ++;
} else {
Expand Down

0 comments on commit 852a8b8

Please sign in to comment.