{"record":{"id":"0e17a572f4249fac","repo":"apache/pulsar","slug":"unknown-auto-failover-policy-params-specified","errorCode":null,"errorMessage":"Unknown auto failover policy params specified : ","messagePattern":"Unknown auto failover policy params specified : ","errorType":"validation","errorClass":"ParameterException","httpStatus":null,"severity":"error","filePath":"pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaceIsolationPolicy.java","lineNumber":239,"sourceCode":"                .build());\n\n        // validation if necessary\n        if (policyType == AutoFailoverPolicyType.min_available) {\n            // ignore\n            boolean error = true;\n            String[] expectParamKeys = { \"min_limit\", \"usage_threshold\" };\n\n            if (autoFailoverPolicyParams.size() == expectParamKeys.length) {\n                for (String paramKey : expectParamKeys) {\n                    if (!autoFailoverPolicyParams.containsKey(paramKey)) {\n                        break;\n                    }\n                }\n                error = false;\n            }\n\n            if (error) {\n                throw new ParameterException(\n                        \"Unknown auto failover policy params specified : \" + autoFailoverPolicyParams);\n            }\n\n        } else {\n            // either we don't handle the new type or user has specified a bad type\n            throw new ParameterException(\"Unknown auto failover policy type specified : \" + autoFailoverPolicyTypeName);\n        }\n\n        nsIsolationDataBuilder.unloadScope(unload);\n\n        return nsIsolationDataBuilder.build();\n    }\n\n    public CmdNamespaceIsolationPolicy(Supplier<PulsarAdmin> admin) {\n        super(\"ns-isolation-policy\", admin);\n        addCommand(\"set\", new SetPolicy());\n        addCommand(\"get\", new GetPolicy());\n        addCommand(\"list\", new GetAllPolicies());","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaceIsolationPolicy.java#L221-L257","documentation":"Thrown when the keys of the --auto-failover-policy-params map contain entries the chosen policy type does not recognize. For policy type minAvailable, only 'min_limit' and 'usage_threshold' are accepted; any other key (or missing required keys, depending on flow) marks the params as unknown and raises this ParameterException.","triggerScenarios":"Running `pulsar-admin namespaces-isolation-policy create` with --auto-failover-policy-type minAvailable and --auto-failover-policy-params containing misspelled keys such as minLimit=5 or min-limit=5 (instead of min_limit=5), or extra unknown keys.","commonSituations":"Camel-case vs snake_case confusion (minLimit vs min_limit); copying params from a different policy type; typos like usage_treshold; adding options from newer/older Pulsar docs than the installed version.","solutions":["Use exactly min_limit and usage_threshold for the minAvailable policy, e.g. --auto-failover-policy-params min_limit=10,usage_threshold=80","Fix key spelling to match the accepted names","Remove any extra/unknown keys from the params list","Check the docs for the Pulsar version in use, since accepted param keys can differ between versions"],"exampleFix":"// before\n--auto-failover-policy-type minAvailable --auto-failover-policy-params minLimit=10,usageThreshold=80\n// after\n--auto-failover-policy-type minAvailable --auto-failover-policy-params min_limit=10,usage_threshold=80","handlingStrategy":"validation","validationCode":"# check param keys before invoking\nALLOWED=\"min_limit usage_threshold\"\nfor kv in ${AUTO_FAILOVER_PARAMS//,/ }; do key=${kv%%=*}; [[ \" $ALLOWED \" == *\" $key \"* ]] || { echo \"bad param key: $key\"; exit 1; }; done","typeGuard":null,"tryCatchPattern":"try { ... } catch (ParameterException e) { /* unknown param key: correct keys, no retry */ }","preventionTips":["For minAvailable use only min_limit and usage_threshold","Use snake_case keys exactly as documented","Remove extra keys and verify against your Pulsar version's docs"],"tags":["cli","argument-validation","auto-failover","pulsar-admin"],"backgroundTag":"invalid-cli-arguments","analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}