We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7d7392 commit c5db567Copy full SHA for c5db567
src/Elasticsearch/Transport.php
@@ -113,9 +113,10 @@ function ($response) {
113
// Note, this could be a 4xx or 5xx error
114
},
115
//onFailure
116
- function ($response) {
+ function (\Exception $response) {
117
// Ignore 400 level errors, as that means the server responded just fine
118
- if (!(isset($response['code']) && $response['code'] >=400 && $response['code'] < 500)) {
+ $code = $response->getCode();
119
+ if (!(isset($code) && $code >=400 && $code < 500)) {
120
// Otherwise schedule a check
121
$this->connectionPool->scheduleCheck();
122
}
0 commit comments