{"record":{"id":"bd5c4e1633690f3c","repo":"elastic/elasticsearch","slug":"illegal-property-value-valid-values-are-bd5c4e","errorCode":null,"errorMessage":"illegal property value [{}]. valid values are {}","messagePattern":"illegal property value \\[(.+?)\\]\\. valid values are (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/UserAgentProcessor.java","lineNumber":240,"sourceCode":"                extractDeviceType,\n                ignoreMissing\n            );\n        }\n    }\n\n    enum Property {\n\n        NAME,\n        OS,\n        DEVICE,\n        ORIGINAL,\n        VERSION;\n\n        public static Property parseProperty(String propertyName) {\n            try {\n                return valueOf(propertyName.toUpperCase(Locale.ROOT));\n            } catch (IllegalArgumentException e) {\n                throw new IllegalArgumentException(\n                    \"illegal property value [\"\n                        + propertyName\n                        + \"]. valid values are \"\n                        + Arrays.toString(EnumSet.allOf(Property.class).toArray())\n                );\n            }\n        }\n    }\n\n    @UpdateForV10(owner = UpdateForV10.Owner.DISTRIBUTED)\n    // This can be removed in V10. It's not possible to create an instance with the ecs property in V9, and all instances created by V8 or\n    // earlier will have been fixed when upgraded to V9.\n    static boolean maybeUpgradeConfig(Map<String, Object> config) {\n        // Instances created using ES 8.x (or earlier) may have the 'ecs' config entry.\n        // This was ignored in 8.x and is unsupported in 9.0.\n        // In 9.x, we should remove it from any existing processors on startup.\n        return config.remove(\"ecs\") != null;\n    }","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/UserAgentProcessor.java#L222-L258","documentation":"Thrown by Property.parseProperty when the property string cannot be matched to one of the enum values NAME, OS, DEVICE, ORIGINAL, VERSION (case-insensitively). This validates the 'properties' list in the user_agent processor config.","triggerScenarios":"Configuring the user_agent processor with a 'properties' array containing a value not in the allowed set, e.g., 'browser', 'engine', 'device_type', or any typo.","commonSituations":"Typos in property names. Using outdated or vendor-specific property names. Copying config from another user-agent parser library with different property names. Case is handled (uppercased), but unrecognized names still fail.","solutions":["Use only the allowed property names: name, os, device, original, version.","Remove or correct any unrecognized entry in the properties array.","Consult the processor documentation for the full valid property list."],"exampleFix":"// before\n{\n  \"user_agent\": { \"field\": \"ua\", \"properties\": [\"name\", \"browser\"] }\n}\n// after\n{\n  \"user_agent\": { \"field\": \"ua\", \"properties\": [\"name\", \"os\", \"device\", \"original\", \"version\"] }\n}","handlingStrategy":"validation","validationCode":"// Validate properties list against the allowed set before config\nSet<String> allowed = Set.of(\"NAME\", \"OS\", \"DEVICE\", \"ORIGINAL\", \"VERSION\");\nfor (String p : properties) {\n    if (!allowed.contains(p.toUpperCase(Locale.ROOT))) {\n        throw new IllegalArgumentException(\"invalid property: \" + p);\n    }\n}","typeGuard":"boolean isValidProperty(String name) {\n    return Set.of(\"name\", \"os\", \"device\", \"original\", \"version\").contains(name.toLowerCase(Locale.ROOT));\n}","tryCatchPattern":"try {\n    Property.parseProperty(propertyName);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"illegal property value\")) {\n        // remove or correct the invalid property name\n    } else { throw e; }\n}","preventionTips":["Use only the five valid property names: name, os, device, original, version.","Validate the properties array in pipeline config validators before deployment.","Reference the user_agent processor docs for the accepted property list."],"tags":["elasticsearch","ingest-pipeline","user-agent","validation","configuration"],"backgroundTag":null,"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}