Skip to content

Add missing properties to Error property on ServerError #2355

@russcam

Description

@russcam

Add Phase and Grouped to Error property on ServerError

Example:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "parse_exception",
        "reason" : "failed to parse date field [-1m] with format [strict_date_optional_time||epoch_millis]"
      }
    ],
    "type" : "search_phase_execution_exception",
    "reason" : "all shards failed",
    "phase" : "query",
    "grouped" : true,
    "failed_shards" : [
      {
        "shard" : 0,
        "index" : "project",
        "node" : "Uo6PBln_QrmD8Y9o1NKdQw",
        "reason" : {
          "type" : "parse_exception",
          "reason" : "failed to parse date field [-1m] with format [strict_date_optional_time||epoch_millis]",
          "caused_by" : {
            "type" : "illegal_argument_exception",
            "reason" : "Parse failure at index [2] of [-1m]"
          }
        }
      }
    ],
    "caused_by" : {
      "type" : "parse_exception",
      "reason" : "failed to parse date field [-1m] with format [strict_date_optional_time||epoch_millis]",
      "caused_by" : {
        "type" : "illegal_argument_exception",
        "reason" : "Parse failure at index [2] of [-1m]"
      }
    }
  },
  "status" : 400
}

Add Line and Col

Example:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "parsing_exception",
        "reason" : "[terms] unknown token [END_ARRAY] after [numberOfCommits]",
        "line" : 9,
        "col" : 7
      }
    ],
    "type" : "parsing_exception",
    "reason" : "[terms] unknown token [END_ARRAY] after [numberOfCommits]",
    "line" : 9,
    "col" : 7
  },
  "status" : 400
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions