Skip to content

[BUG] return null_pointer_exception if the definition of processor is null when creating or updating a ingest pipeline #9257

@gaobinlong

Description

@gaobinlong

Describe the bug
When creating or updating a ingest pipeline by PUT _ingest/pipeline/xx, if the definition of the processor is null, then OpenSearch throws null_pointer_exception with 500 http status code.

To Reproduce
Steps to reproduce the behavior:

  1. Create a ingest pipeline
PUT _ingest/pipeline/x
{
  "processors": [
    {
      "set": null
    }
  ]
}

then you can see the error:

{
  "error": {
    "root_cause": [
      {
        "type": "null_pointer_exception",
        "reason": "Cannot invoke \"Object.getClass()\" because \"config\" is null"
      }
    ],
    "type": "null_pointer_exception",
    "reason": "Cannot invoke \"Object.getClass()\" because \"config\" is null"
  },
  "status": 500
}

Expected behavior
Validate the definition of the processor, returns 400 bad request error if the definition is null.

Screenshots
image

Host/Environment (please complete the following information):

  • OS: [macOS]
  • Version [2.9]

Metadata

Metadata

Assignees

No one assigned

    Labels

    IndexingIndexing, Bulk Indexing and anything related to indexingbugSomething isn't workingv2.10.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions