diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java index f6d69a0b96ed8..ec9de23e6233f 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java @@ -1377,7 +1377,7 @@ protected void internalSetBacklogQuota(BacklogQuotaType backlogQuotaType, Backlo "[{}] Failed to update backlog configuration" + " for namespace {}: conflicts with retention quota", clientAppId(), namespaceName); - new RestException(Status.PRECONDITION_FAILED, + throw new RestException(Status.PRECONDITION_FAILED, "Backlog Quota exceeds configured retention quota for namespace." + " Please increase retention quota and retry"); } @@ -1427,7 +1427,7 @@ protected void internalSetRetention(RetentionPolicies retention) { log.warn("[{}] Failed to update retention configuration" + " for namespace {}: conflicts with backlog quota", clientAppId(), namespaceName); - new RestException(Status.PRECONDITION_FAILED, + throw new RestException(Status.PRECONDITION_FAILED, "Retention Quota must exceed configured backlog quota for namespace."); } policies.retention_policies = retention;