Closed ccc-nghia-le closed 1 year ago
I got this too.
Had to do composer require elasticsearch/elasticsearch:8.8.0
to get it working, something about allowing psr/http-message: ^2
is causing issues from 8.8.1
I got this too. Had to do
composer require elasticsearch/elasticsearch:8.8.0
to get it working, something about allowingpsr/http-message: ^2
is causing issues from8.8.1
Downgrading to 8.8.0 did actually help. Thank you very much !
I hope they will fix this soon in a future release.
thanks a lot, its worked for me as well .
@murilolivorato, @ccc-nghia-le and @danielsimkus can you try the PR #1344 and let me know if this fix the issue? Thanks!
I finally reproduced the issue, read here: https://github.com/elastic/elasticsearch-php/issues/1342#issuecomment-1663517415
The discussion will continue in #1342. If you still have issue please test this solution.
Summary of problem or feature request
I created a deployment in elasticloud, and set up the connection. Then I performed a search using $client->search() surrounded it with a try catch code block, via debugging I could it failed with http code 401 Unauthorised, I believe there is something wrong with my elasticloud setup, that's fine. I expected it would hit my catch() block but it never did. Instead there was an error thrown:
Code snippet of problem
$client = Elastic\Elasticsearch\ClientBuilder::create() ->setElasticCloudId('')
->setApiKey('')
->build();
try { $result = $client->search($params); } catch (\Exception $e) { dd(' It should hit here but it did not'); }
System details