diff --git a/services/src/main/java/org/keycloak/authorization/admin/PolicyService.java b/services/src/main/java/org/keycloak/authorization/admin/PolicyService.java index f8b4d5cebd..59eac579b0 100644 --- a/services/src/main/java/org/keycloak/authorization/admin/PolicyService.java +++ b/services/src/main/java/org/keycloak/authorization/admin/PolicyService.java @@ -161,7 +161,7 @@ public class PolicyService { Policy model = storeFactory.getPolicyStore().findByName(name, this.resourceServer.getId()); if (model == null) { - throw new NotFoundException(); + return Response.noContent().build(); } return Response.ok(toRepresentation(model, fields, authorization)).build();