{"record":{"id":"9f2b1a9540940d73","repo":"elastic/elasticsearch","slug":"deprecated-fields-not-supported-in-parsername-9f2b1a","errorCode":null,"errorMessage":"deprecated fields not supported in [{parserName}] but got [{removedName}] at [{location}] which has been deprecated entirely","messagePattern":"deprecated fields not supported in \\[(.+?)\\] but got \\[(.+?)\\] at \\[(.+?)\\] which has been deprecated entirely","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"libs/x-content/src/main/java/org/elasticsearch/xcontent/DeprecationHandler.java","lineNumber":71,"sourceCode":"                        + \"] but got [\"\n                        + oldName\n                        + \"] at [\"\n                        + location.get()\n                        + \"] which has been replaced with [\"\n                        + currentName\n                        + \"]\"\n                );\n            } else {\n                throw new UnsupportedOperationException(\n                    \"deprecated fields not supported here but got [\" + oldName + \"] which has been replaced with [\" + currentName + \"]\"\n                );\n            }\n        }\n\n        @Override\n        public void logRemovedField(String parserName, Supplier<XContentLocation> location, String removedName) {\n            if (parserName != null) {\n                throw new UnsupportedOperationException(\n                    \"deprecated fields not supported in [\"\n                        + parserName\n                        + \"] but got [\"\n                        + removedName\n                        + \"] at [\"\n                        + location.get()\n                        + \"] which has been deprecated entirely\"\n                );\n            } else {\n                throw new UnsupportedOperationException(\n                    \"deprecated fields not supported here but got [\" + removedName + \"] which has been deprecated entirely\"\n                );\n            }\n        }\n    };\n\n    /**\n     * Ignores all deprecations","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/libs/x-content/src/main/java/org/elasticsearch/xcontent/DeprecationHandler.java#L53-L89","documentation":"THROW_UNSUPPORTED_OPERATION.logRemovedField throws when the input uses a field that has been removed entirely (deprecated with no replacement) and parserName is non-null. Unlike renamed/replaced, there is no substitute field; the field is gone. parserName and location are included to aid correction.","triggerScenarios":"Strict parsing of a request containing a field that was fully removed in a prior version. Clients built against an old API sending a now-deleted field to a strict handler.","commonSituations":"Feature removals where the field has no successor. Forcing callers off a removed configuration knob.","solutions":["Remove the field from the input entirely; it has no replacement.","If the capability is still needed, find the new API/field that supersedes it in release notes and migrate.","During a deprecation window, switch the handler to log instead of throw so callers can migrate gracefully."],"exampleFix":"// before\n{\"include_type_name\": true}  // removed field\n// after: delete the field\n{}","handlingStrategy":"validation","validationCode":"// drop removed deprecated fields before strict parsing\nSet<String> removed = Set.of(\"include_type_name\");\nremoved.forEach(body::remove);","typeGuard":null,"tryCatchPattern":"try {\n    p.parse(parser, ctx);\n} catch (UnsupportedOperationException e) {\n    if (e.getMessage().contains(\"deprecated entirely\")) {\n        // remove the field entirely and retry\n    }\n}","preventionTips":["Strip fields known to be fully removed before strict parsing.","Track removals per version and validate input against the target version's allowed field set.","Use a logging handler during the deprecation window so callers can migrate before the strict cutover."],"tags":["xcontent","deprecation","strict","removed-field"],"backgroundTag":null,"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}