Skip to content

Is it possible to include the processor_tag in the response if a pipeline with an invalid processor type is sent to simulate? #21429

@BigFunger

Description

@BigFunger

Is it possible to include the processor_tag in the response if a pipeline with an invalid processor type is sent to simulate?

Currently, if I try to simulate a pipeline that throws a compile error like this:

{
  "pipeline": {
    "description": "",
    "processors": [
      {
        "script": {
          "tag": "script_1"
        }
      }
    ]
  },
  "docs": [
    {
      "_source": {
        "foo": "bar"
      }
    }
  ]
}

I get this response:

{
  "error": {
    "root_cause": [
      {
        "type": "parse_exception",
        "reason": "[lang] required property is missing",
        "header": {
          "processor_type": "script",
          "processor_tag": "script_1",
          "property_name": "lang"
        }
      }
    ],
    "type": "parse_exception",
    "reason": "[lang] required property is missing",
    "header": {
      "processor_type": "script",
      "processor_tag": "script_1",
      "property_name": "lang"
    }
  },
  "status": 400
}

I would like to get a similar response when I attempt to simulate a pipeline with an invalid processor type like this:

{
  "pipeline": {
    "description": "",
    "processors": [
      {
        "": {
          "tag": "processor_1"
        }
      }
    ]
  },
  "docs": [
    {
      "_source": {
        "foo": "bar"
      }
    }
  ]
}

The response I currently get is this:

{
  "error": {
    "root_cause": [
      {
        "type": "parse_exception",
        "reason": "No processor type exists with name []"
      }
    ],
    "type": "parse_exception",
    "reason": "No processor type exists with name []"
  },
  "status": 400
}

The response that I would like is something like this:

{
  "error": {
    "root_cause": [
      {
        "type": "parse_exception",
        "reason": "No processor type exists with name []",
        "header": {
          "processor_tag": "processor_1"
        }
      }
    ],
    "type": "parse_exception",
    "reason": "No processor type exists with name []",
    "header": {
      "processor_tag": "processor_1"
    }
  },
  "status": 400
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions