{"record":{"id":"4bc4abb657ab1f1d","repo":"apache/pulsar","slug":"namespace-policies-does-not-exist","errorCode":null,"errorMessage":"Namespace policies does not exist","messagePattern":"Namespace policies does not exist","errorType":"http","errorClass":"RestException","httpStatus":404,"severity":"error","filePath":"pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java","lineNumber":3252,"sourceCode":"                }).exceptionally(ex -> {\n                    resumeAsyncResponseExceptionally(asyncResponse, ex);\n                    log.error()\n                            .attr(\"namespace\", namespaceName)\n                            .exception(ex)\n                            .log(\"Failed to update the replicatorDispatchRate for cluster on namespace\");\n                    return null;\n                });\n    }\n    /**\n     * Base method for getReplicatorDispatchRate v1 and v2.\n     * Notion: don't re-use this logic.\n     */\n    protected void internalGetReplicatorDispatchRate(AsyncResponse asyncResponse) {\n        validateNamespacePolicyOperationAsync(namespaceName, PolicyName.REPLICATION_RATE, PolicyOperation.READ)\n                .thenCompose(__ -> namespaceResources().getPoliciesAsync(namespaceName))\n                .thenApply(policiesOpt -> {\n                    if (!policiesOpt.isPresent()) {\n                        throw new RestException(Response.Status.NOT_FOUND, \"Namespace policies does not exist\");\n                    }\n                    String clusterName = pulsar().getConfiguration().getClusterName();\n                    return policiesOpt.get().replicatorDispatchRate.get(clusterName);\n                }).thenAccept(asyncResponse::resume)\n                .exceptionally(ex -> {\n                    resumeAsyncResponseExceptionally(asyncResponse, ex);\n                    log.error()\n                            .attr(\"namespace\", namespaceName)\n                            .exception(ex)\n                            .log(\"Failed to get replicator dispatch-rate configured for the namespace\");\n                    return null;\n                });\n    }\n    /**\n     * Base method for removeReplicatorDispatchRate v1 and v2.\n     * Notion: don't re-use this logic.\n     */\n    protected void internalRemoveReplicatorDispatchRate(AsyncResponse asyncResponse) {","sourceCodeStart":3234,"sourceCodeEnd":3270,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L3234-L3270","documentation":"Thrown when the namespace's policy ZooKeeper node is missing while reading policies (e.g. the replicator dispatch-rate getter), meaning the namespace was never created or its policies were deleted; the admin operation cannot proceed without an existing namespace.","triggerScenarios":"Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java:3252 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the namespace before applying policies","Check whether another client concurrently deleted the namespace and retry with a valid one"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}