From e27d39f6b3efbb8b08532254b675e217902c26db Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Thu, 25 May 2023 07:19:26 +0200 Subject: [PATCH] fix the get --- .../fiware/iam/rest/TrustedIssuerRegistryController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/org/fiware/iam/rest/TrustedIssuerRegistryController.java b/src/main/java/org/fiware/iam/rest/TrustedIssuerRegistryController.java index 46cdd0b..8db779b 100644 --- a/src/main/java/org/fiware/iam/rest/TrustedIssuerRegistryController.java +++ b/src/main/java/org/fiware/iam/rest/TrustedIssuerRegistryController.java @@ -101,6 +101,14 @@ public HttpResponse getIssuersV4(@Nullable Integer pageSize, } } + if (issuerEntries.isEmpty()) { + return HttpResponse.ok(new IssuersResponseVO() + .items(List.of()) + .total(0) + .pageSize(0) + .self(SELF_REF)); + } + return HttpResponse.ok(new IssuersResponseVO() .items(issuerEntries) .total((int) trustedIssuerRepository.count())