# Logstash HTTP code 400 {:response\_code=\>400}

**URL:** https://discuss.elastic.co/t/logstash-http-code-400-response-code-400/338501
**Category:** Elasticsearch
**Created:** [July 17, 2023, 6:07am UTC](https://discuss.elastic.co/t/logstash-http-code-400-response-code-400/338501 "2023-07-17T06:07:38Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![PodarcisMuralis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/podarcismuralis/32/122606_2.png) [@PodarcisMuralis](https://discuss.elastic.co/u/PodarcisMuralis)
#### Post date: [July 17, 2023, 7:19pm UTC](https://discuss.elastic.co/t/logstash-http-code-400-response-code-400/338501/2 "2023-07-17T19:19:13Z")

</div>

Hi.

I had the same issue. It is a bug in the plugin itself. I spent 2 days on this.

Please check this out.

> [@Logstash pipeline Http output plugin error "\[HTTP Output Failure\] Encountered non-2xx HTTP code 400"](https://discuss.elastic.co/t/logstash-pipeline-http-output-plugin-error-http-output-failure-encountered-non-2xx-http-code-400/338116):
>
> Hi all, I have a logstash output http plugin: output { if [@metadata][index\_to\_delete] == "first\_index" or [@metadata][index\_to\_delete] == "second\_index" { http { id =\> "http\_index\_delete" url =\> "https://HOST:9200/%{[@metadata][index\_to\_delete]}" http\_method =\> "delete" cacert =\> 'mycert.cer' user =\> "user\_with\_delete\_index\_right" password =\> "mypass" } } } An I get this error: [2023-07-11T16:15:03,083][ERROR][lo…

---

_[View the full topic](https://discuss.elastic.co/t/logstash-http-code-400-response-code-400/338501)._
