Skip to content

Commit

Permalink
Fix invalidValue code and update to generic error message for group I…
Browse files Browse the repository at this point in the history
…D requirement
  • Loading branch information
BimsaraBodaragama committed Jul 4, 2024
1 parent 04d7b00 commit b10c883
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -777,9 +777,8 @@ private void prepareAddedRemovedGroupLists(Set<String> addedGroupsIds, Set<Strin
String value = groupObject.get(SCIMConstants.CommonSchemaConstants.VALUE);

if (StringUtils.isBlank(value)) {
throw new BadRequestException(
"Updating groups of the role by display name is not supported. Update using group id instead.",
ResponseCodeConstants.INVALID_SYNTAX);
throw new BadRequestException("Group id is required to update group of the role.",
ResponseCodeConstants.INVALID_VALUE);
}

switch (groupOperation.getOperation()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1219,9 +1219,8 @@ private void prepareInitialGroupLists(Set<String> givenAddedGroupsIds, Set<Strin
String value = groupObject.get(SCIMConstants.CommonSchemaConstants.VALUE);

if (StringUtils.isBlank(value)) {
throw new BadRequestException(
"Updating groups of the role by display name is not supported. Update using group id instead.",
ResponseCodeConstants.INVALID_SYNTAX);
throw new BadRequestException("Group id is required to update group of the role.",
ResponseCodeConstants.INVALID_VALUE);
}

switch (groupOperation.getOperation()) {
Expand Down

0 comments on commit b10c883

Please sign in to comment.