Skip to content

Commit

Permalink
add forbidden response
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasasr1 committed Jul 4, 2023
1 parent 008515f commit e0d57d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.wso2.charon3.core.exceptions.BadRequestException;
import org.wso2.charon3.core.exceptions.CharonException;
import org.wso2.charon3.core.exceptions.ConflictException;
import org.wso2.charon3.core.exceptions.ForbiddenException;
import org.wso2.charon3.core.exceptions.NotFoundException;
import org.wso2.charon3.core.exceptions.NotImplementedException;
import org.wso2.charon3.core.objects.Role;
Expand Down Expand Up @@ -129,7 +130,8 @@ RolesGetResponse listRolesWithPost(SearchRequest searchRequest)
* @throws NotImplementedException Functionality no implemented exception.
*/
default Role patchRole(String roleId, Map<String, List<PatchOperation>> patchOperations)
throws NotImplementedException, BadRequestException, CharonException, ConflictException, NotFoundException {
throws NotImplementedException, BadRequestException, CharonException, ConflictException, NotFoundException,
ForbiddenException {

throw new NotImplementedException("patchRole method is not implemented");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.wso2.charon3.core.exceptions.BadRequestException;
import org.wso2.charon3.core.exceptions.CharonException;
import org.wso2.charon3.core.exceptions.ConflictException;
import org.wso2.charon3.core.exceptions.ForbiddenException;
import org.wso2.charon3.core.exceptions.InternalErrorException;
import org.wso2.charon3.core.exceptions.NotFoundException;
import org.wso2.charon3.core.exceptions.NotImplementedException;
Expand Down Expand Up @@ -613,7 +614,7 @@ private SCIMResponse updateWithPatchOperations(String existingRoleId, List<Patch
Role updatedRole = roleManager.patchRole(existingRoleId, patchOperations);
return getScimResponse(encoder, updatedRole);
} catch (NotFoundException | BadRequestException | NotImplementedException | ConflictException |
CharonException | InternalErrorException e) {
CharonException | InternalErrorException | ForbiddenException e) {
return AbstractResourceManager.encodeSCIMException(e);
}
}
Expand Down

0 comments on commit e0d57d9

Please sign in to comment.