# Uncaught exception Client error response \[status code\] 400

**URL:** <https://discuss.elastic.co/t/uncaught-exception-client-error-response-status-code-400/173009>\
**Category:** Elasticsearch\
**Created:** [March 19, 2019, 4:01pm UTC](https://discuss.elastic.co/t/uncaught-exception-client-error-response-status-code-400/173009 "2019-03-19T16:01:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liaqat\_Bangash](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liaqat_bangash/32/42354_2.png) [@Liaqat\_Bangash](https://discuss.elastic.co/u/Liaqat_Bangash)\
**Post date:** [March 19, 2019, 4:01pm UTC](https://discuss.elastic.co/t/uncaught-exception-client-error-response-status-code-400/173009/1 "2019-03-19T16:01:57Z")

</div>

my version is elasticsearch-6.1.3 . It is working for me for development server,  
but when I deploy to my customer. the elastic index is ok, and load drugs,  
[http://localhost:9200/drugs/\_search](http://localhost:9200/drugs/_search)  
but the php script fails to access, your help will be appreciated,  
thanks, error is below

**Fatal error** : Uncaught exception 'Guzzle\Http\Exception\ClientErrorResponseException' with message 'Client error response [status code] 400 [reason phrase] Bad Request [url] [http://localhost:9200/drugs/medicine/\_search](http://localhost:9200/drugs/medicine/_search)' in D:\bmw\btdata\elast\_search\php\vendor\guzzle\guzzle\src\Guzzle\Http\Exception\BadResponseException.php:43 Stack trace: #0 D:\bmw\btdata\elast\_search\php\vendor\guzzle\guzzle\src\Guzzle\Http\Message\Request.php(145): Guzzle\Http\Exception\BadResponseException::factory(Object(Guzzle\Http\Message\EntityEnclosingRequest), Object(Guzzle\Http\Message\Response)) #1 [internal function]: Guzzle\Http\Message\Request::onRequestError(Object(Guzzle\Common\Event), 'request.error', Object(Symfony\Component\EventDispatcher\EventDispatcher)) #2 D:\bmw\btdata\elast\_search\php\vendor\symfony\event-dispatcher\EventDispatcher.php(184): call\_user\_func(Array, Object(Guzzle\Common\Event), 'request.error', Object(Symfony\Component\EventDispatcher\EventDispatcher)) #3 D:\bmw\btdata\elast\_search\php\vendor\symfony\event-dispatc in **D:\bmw\btdata\elast\_search\php\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Connections\GuzzleConnection.php** on line **277**

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 16, 2019, 4:01pm UTC](https://discuss.elastic.co/t/uncaught-exception-client-error-response-status-code-400/173009/2 "2019-04-16T16:01:59Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
