{"record":{"id":"8222d951af105b86","repo":"apache/flink","slug":"s-is-an-unknown-value-of-restartstrategytype","errorCode":null,"errorMessage":"%s is an unknown value of RestartStrategyType.","messagePattern":"(.+?) is an unknown value of RestartStrategyType\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink-core/src/main/java/org/apache/flink/configuration/RestartStrategyOptions.java","lineNumber":91,"sourceCode":"        EXPONENTIAL_DELAY(\"exponential-delay\", Sets.newHashSet(\"exponentialdelay\"));\n\n        private final String mainValue;\n        private final Set<String> allAvailableValues;\n\n        RestartStrategyType(String mainValue, Set<String> otherAvailableValues) {\n            this.mainValue = mainValue;\n            this.allAvailableValues = Sets.newHashSet(mainValue);\n            allAvailableValues.addAll(otherAvailableValues);\n        }\n\n        /** Return the corresponding RestartStrategyType based on the displayed value. */\n        public static RestartStrategyType of(String value) {\n            for (RestartStrategyType restartStrategyType : RestartStrategyType.values()) {\n                if (restartStrategyType.getAllAvailableValues().contains(value)) {\n                    return restartStrategyType;\n                }\n            }\n            throw new IllegalArgumentException(\n                    String.format(\"%s is an unknown value of RestartStrategyType.\", value));\n        }\n\n        public String getMainValue() {\n            return mainValue;\n        }\n\n        public Set<String> getAllAvailableValues() {\n            return allAvailableValues;\n        }\n\n        public TextElement[] getAllTextElement() {\n            return allAvailableValues.stream().map(TextElement::code).toArray(TextElement[]::new);\n        }\n    }\n\n    private static InlineElement[] concat(InlineElement[] first, InlineElement... second) {\n        InlineElement[] result = new InlineElement[first.length + second.length];","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-core/src/main/java/org/apache/flink/configuration/RestartStrategyOptions.java#L73-L109","documentation":"Thrown by RestartStrategyType.of(String) when the supplied value does not match any accepted display value of the four restart strategy types (disable/none/off, fixed-delay, failure-rate, exponential-delay). The enum lookup iterates all available aliases before rejecting.","triggerScenarios":"Setting restart-strategy.type (or the deprecated restart-strategy key) to a misspelled or unsupported value in flink-conf.yaml or via -D. Values are matched exactly against the alias sets, so typos like 'fixed delay' (space) or 'fixeddelay-' fail.","commonSituations":"Using hyphens inconsistently (fixed-delay vs fixeddelay vs fixed delay). Copying a strategy name from old documentation. Using 'none' on a version that only accepts 'disable' (though aliases exist, exact match is required).","solutions":["Use one of the exact accepted values: disable, none, off, fixed-delay, failure-rate, exponential-delay.","Check for typos, extra spaces, or wrong casing (values are matched exactly, not case-insensitively).","Consult RestartStrategyOptions.RestartStrategyType.getAllAvailableValues() for the authoritative list."],"exampleFix":"# before\nrestart-strategy.type: fixed delay\n\n# after\nrestart-strategy.type: fixed-delay","handlingStrategy":"validation","validationCode":"Set<String> valid = Set.of(\"disable\", \"none\", \"off\", \"fixed-delay\", \"failure-rate\", \"exponential-delay\");\nif (!valid.contains(value)) {\n    throw new IllegalArgumentException(\"Invalid restart strategy: \" + value);\n}","typeGuard":"static boolean isValidRestartStrategy(String v) {\n    return Set.of(\"disable\", \"none\", \"off\", \"fixed-delay\", \"fixeddelay\",\n        \"failure-rate\", \"failurerate\", \"exponential-delay\", \"exponentialdelay\").contains(v);\n}","tryCatchPattern":"try {\n    RestartStrategyType.of(value);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"unknown value of RestartStrategyType\")) { /* fix value */ }\n}","preventionTips":["Use the exact hyphenated strategy name (fixed-delay, not 'fixed delay').","Validate the value against RestartStrategyType before setting it.","Avoid deprecated key aliases that may behave differently."],"tags":["configuration","restart-strategy","enum"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}