Summary of problem or feature request
When 400 error occurred, the client may throw AlreadyExpiredException event if the error is NOT AlreadyExpiredException surely.
Code snippet of problem
This is an example.
$param = [
'index' => 'test',
'body' => [
"query" =>
[
'query_string' => [
'fields' => ['field1'],
'query' => 'AlreadyExpiredException NOT'
]
]
]
];
$result = $client->search($param);
Because the query includes "AlreadyExpiredException", the error is regarded as AlreadyExpiredException. It should be parse_exception.
This code has the problem.
https://github.com/elastic/elasticsearch-php/blob/v6.1.0/src/Elasticsearch/Connections/Connection.php#L602
ScriptLangNotSupportedException also has same issue.
System details
- Operating System
Linux
- PHP Version
7.3.4
- ES-PHP client version
6.1.0
- Elasticsearch version
7.0.0