Skip to content

Add token location to exceptions thrown when parsing documents #85083

@javanna

Description

@javanna

Today in many places where we throw exceptions while parsing documents we use MapperParsingException. This exception does not hold the token location, which would be good to include in the error message, usually done by using XContentParseException which accepts the token location as a constructor argument.

We should either switch exception (would that have side effects?) or add the token location to the existing exception. It is a shame that it is possible to provide information back about where the parsing problem occurred, yet we don't take advantage of this.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions