Answer the question
In order to leave comments, you need to log in
How to catch exceptions in Elasticsearch?
I need to catch the errors that elasticsaerch gives,
for example, this and create a log file
Fatal error: Uncaught exception 'Guzzle\Http\Exception\ClientErrorResponseException' with message 'Client error response [status code] 400 [reason phrase] Bad Request [url] 192.168.1.45:9200/_all/_search ' in vendor/guzzle/guzzle /src/Guzzle/Http/Exception/BadResponseException.php:43 Stack trace: #0 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
vendor/symfony/event-dispatcher/EventDispatcher.php(164): call_user_func(Array, Object(Guzzle\Common\Event), 'request.error', Object(Symfony\Component\EventDispatcher\EventDispatcher)) #3
vendor/symfony /event-dispatcher/EventDispatcher.php(53): Symfony\Component\EventDispatcher\Event in vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/GuzzleConnection.php on line 282
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question