mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
If you make a mistake and specify a mapping like: ``` { "parent": { "properties": {} }, "child": { "_parent": "parent", "properties": {} } } ``` then the error message you get back amounts to `Failed to parse mapping for [child]: can't cast a String to a Map`. Since it doens't tell you *which* string can't be cast to a map you have to dig through the stack trace to figure out what to fix. This replaces the error message with: ``` Failed to parse mapping [child]: [_parent] must be an object containing [type] ``` so you can tell that the problem is with the `parent` field.