Skip to content

Commit

Permalink
Merge pull request #514 from ChanikaRuchini/master
Browse files Browse the repository at this point in the history
Fix internal server errors when updating an application role.
  • Loading branch information
ChanikaRuchini authored Nov 30, 2023
2 parents ba9d9d8 + d91ad6b commit e4b517a
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 e4b517a

Please sign in to comment.