Skip to content

Commit

Permalink
Skip logging client errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kayathiri4 committed Feb 27, 2024
1 parent 998419e commit 62544cc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,6 @@ public User updateUser(User user, Map<String, Boolean> requiredAttributes) throw
throw new BadRequestException(errorMessage, ResponseCodeConstants.INVALID_VALUE);
} catch (UserStoreException e) {
String errMsg = "Error while updating attributes of user: " + user.getUserName();
log.error(errMsg, e);
// Sometimes client exceptions are wrapped in the super class.
// Therefore checking for possible client exception.
Throwable ex = ExceptionUtils.getRootCause(e);
Expand All @@ -1142,6 +1141,7 @@ public User updateUser(User user, Map<String, Boolean> requiredAttributes) throw
throw new BadRequestException(errorMessage, ResponseCodeConstants.INVALID_VALUE);
}
handleErrorsOnUserNameAndPasswordPolicy(e);
log.error(errMsg, e);
if (isNotifyUserstoreStatusEnabled()) {
throw resolveError(e, errMsg + ". " + e.getMessage());
} else {
Expand Down

0 comments on commit 62544cc

Please sign in to comment.