{"record":{"id":"bb14aa89374c75d6","repo":"apache/pulsar","slug":"unknown-auto-failover-policy-type-specified","errorCode":null,"errorMessage":"Unknown auto failover policy type specified : ","messagePattern":"Unknown auto failover policy type specified : ","errorType":"validation","errorClass":"ParameterException","httpStatus":null,"severity":"error","filePath":"pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaceIsolationPolicy.java","lineNumber":245,"sourceCode":"            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());\n        addCommand(\"delete\", new DeletePolicy());\n        addCommand(\"brokers\", new GetAllBrokersWithPolicies());\n        addCommand(\"broker\", new GetBrokerWithPolicies());\n    }\n\n}","sourceCodeStart":227,"sourceCodeEnd":263,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaceIsolationPolicy.java#L227-L263","documentation":"Thrown when the --auto-failover-policy-type value does not match any supported auto-failover policy type. Currently the CLI only recognizes 'minAvailable'; anything else (or a wrong casing like MinAvailable / minavailable) falls into the else branch and raises this ParameterException.","triggerScenarios":"Running `pulsar-admin namespaces-isolation-policy create` with e.g. --auto-failover-policy-type maxAvailable, --auto-failover-policy-type MinAvailable (wrong case), or the flag omitted so a null type is compared.","commonSituations":"Guessing a policy type name that does not exist; inventing a type seen in another system; case-sensitivity mistakes; shell variable interpolation producing an empty or misspelled type.","solutions":["Use exactly --auto-failover-policy-type minAvailable (lowercase)","Check spelling and casing of the supplied type name","Omit the --auto-failover-policy-* flags entirely if you do not want an auto failover policy","Confirm against the Pulsar docs/CLI help for supported policy types in your version"],"exampleFix":"// before\n--auto-failover-policy-type MinAvailable --auto-failover-policy-params min_limit=10\n// after\n--auto-failover-policy-type minAvailable --auto-failover-policy-params min_limit=10,usage_threshold=80","handlingStrategy":"validation","validationCode":"case \"$AUTO_FAILOVER_TYPE\" in\n  minAvailable) ;;\n  *) echo \"unsupported auto failover policy type: $AUTO_FAILOVER_TYPE\"; exit 1;;\nesac","typeGuard":null,"tryCatchPattern":"try { ... } catch (ParameterException e) { /* bad policy type: fix to 'minAvailable', no retry */ }","preventionTips":["Only supported type today is minAvailable (exact lowercase)","Omit the flag pair entirely when no auto failover policy is wanted","Interpolate variables carefully to avoid empty type values"],"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"}