{"action":"opened","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/18139","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18139/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18139/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18139/events","html_url":"https://github.com/elastic/elasticsearch/issues/18139","id":153033593,"number":18139,"title":"NPE when calling non existing ingest pipeline","user":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Ingest","name":":Ingest","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/bug","name":"bug","color":"9e2c2c"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/low%20hanging%20fruit","name":"low hanging fruit","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-04T14:58:46Z","updated_at":"2016-05-04T14:58:46Z","closed_at":null,"body":"**Elasticsearch version**: 5.0.0-alpha2\r\n**Description of the problem including expected versus actual behavior**: NPE is thrown when calling non existing ingest pipeline. I would expect a better message like \"Pipeline [{}] does not exist\".\r\n\r\n**Steps to reproduce**:\r\n\r\n```sh\r\ncurl -XDELETE \"localhost:9200/_ingest/pipeline/doesnotexist?pretty\"\r\ncurl -XPOST \"localhost:9200/_ingest/pipeline/doesnotexist/_simulate?pretty\" -d '{\r\n\t\"docs\": [ {\r\n\t\t\"_index\": \"index\",\r\n\t\t\"_type\": \"type\",\r\n\t\t\"_id\": \"id\",\r\n\t\t\"_source\": {\r\n\t\t\t\"foo\" : \"baz\"\r\n\t\t}\r\n\t}\t]\r\n}'\r\n``` \r\n\r\nGives back:\r\n\r\n```json\r\n  \"error\" : {\r\n    \"root_cause\" : [ {\r\n      \"type\" : \"null_pointer_exception\",\r\n      \"reason\" : null\r\n    } ],\r\n    \"type\" : \"null_pointer_exception\",\r\n    \"reason\" : null\r\n  },\r\n  \"status\" : 500\r\n}\r\n```\r\n\r\n**Provide logs (if relevant)**:\r\n\r\n```\r\n[2016-05-04 16:55:54,814][WARN ][rest.suppressed          ] /_ingest/pipeline/doesnotexist/_simulate Params: {pretty=, id=doesnotexist}\r\njava.lang.NullPointerException\r\n\tat org.elasticsearch.action.ingest.SimulateExecutionService$1.doRun(SimulateExecutionService.java:72)\r\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:452)\r\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```"}}