Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gaobinlong opened this issue Aug 11, 2023 · 2 comments
Labels
bug Something isn't working Indexing Indexing, Bulk Indexing and anything related to indexing v2.10.0

Comments

@gaobinlong
Copy link
Collaborator

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]
@gaobinlong gaobinlong added bug Something isn't working untriaged labels Aug 11, 2023
@Xtansia Xtansia added the Indexing Indexing, Bulk Indexing and anything related to indexing label Aug 14, 2023
@reta reta added the v2.10.0 label Sep 4, 2023
@reta reta closed this as completed Sep 4, 2023
@msfroh
Copy link
Collaborator

msfroh commented Sep 5, 2023

Does it make sense to create a set processor with a null config?

I agree that a NullPointerException is not ideal, but it should still throw an error, right?

@reta
Copy link
Collaborator

reta commented Sep 5, 2023

I agree that a NullPointerException is not ideal, but it should still throw an error, right?

Yes, it does exactly that now - an error instead of NPE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Indexing Indexing, Bulk Indexing and anything related to indexing v2.10.0
Projects
None yet
Development

No branches or pull requests

5 participants