OpenSearch/docs/painless/painless-guide
Stuart Tettemer 41c15b438d
Scripting: Add char position of script errors (#51069) (#51266)
Add the character position of a scripting error to error responses.

The contents of the `position` field are experimental and subject to
change.  Currently, `offset` refers to the character location where the
error was encountered, `start` and `end` define a range of characters
that contain the error.

eg.
```
{
  "error": {
    "root_cause": [
      {
        "type": "script_exception",
        "reason": "runtime error",
        "script_stack": [
          "y = x;",
          "     ^---- HERE"
        ],
        "script": "def x = new ArrayList(); Map y = x;",
        "lang": "painless",
        "position": {
          "offset": 33,
          "start": 29,
          "end": 35
        }
      }
```

Refs: #50993
2020-01-21 13:45:59 -07:00
..
index.asciidoc
painless-datetime.asciidoc [DOCS] Correct typos in Painless datetime docs (#50563) 2020-01-02 13:16:56 -05:00
painless-debugging.asciidoc Scripting: Add char position of script errors (#51069) (#51266) 2020-01-21 13:45:59 -07:00
painless-execute-script.asciidoc [DOCS] Fix typos in Painless execute API docs(#47518) 2019-10-18 10:31:04 -04:00
painless-method-dispatch.asciidoc
painless-walkthrough.asciidoc