diff --git a/backend/src/main/java/com/redhat/cloud/notifications/auth/rbac/RbacClientResponseFilter.java b/backend/src/main/java/com/redhat/cloud/notifications/auth/rbac/RbacClientResponseFilter.java index 95afb4d0ab..ed93db4179 100644 --- a/backend/src/main/java/com/redhat/cloud/notifications/auth/rbac/RbacClientResponseFilter.java +++ b/backend/src/main/java/com/redhat/cloud/notifications/auth/rbac/RbacClientResponseFilter.java @@ -58,6 +58,10 @@ public void filter(final ClientRequestContext requestContext, final ClientRespon * {@code {header1=value1, header2=[value2, value3]}}. */ private String headersToString(final MultivaluedMap headers) { + if (headers == null || headers.isEmpty()) { + return ""; + } + final StringBuilder sb = new StringBuilder(); for (final Map.Entry> entry : headers.entrySet()) { sb.append(entry.getKey());