Skip to content

Commit

Permalink
Fix internal server errors while when updating an application role.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanikaRuchini committed Nov 29, 2023
1 parent ba9d9d8 commit d91ad6b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,8 @@ private void doUpdatePermissions(RoleV2 oldRole, RoleV2 newRole) throws BadReque
} catch (IdentityRoleManagementException e) {
if (StringUtils.equals(RoleConstants.Error.INVALID_REQUEST.getCode(), e.getErrorCode())) {
throw new BadRequestException(e.getMessage());
} else if (RoleConstants.Error.INVALID_PERMISSION.getCode().equals(e.getErrorCode())) {
throw new BadRequestException(e.getMessage(), ResponseCodeConstants.INVALID_VALUE);
} else if (StringUtils.equals(OPERATION_FORBIDDEN.getCode(), e.getErrorCode())) {
throw new BadRequestException(e.getMessage());
}
Expand Down

0 comments on commit d91ad6b

Please sign in to comment.