{"record":{"id":"39f479b9ca7cecba","repo":"Seldaek/monolog","slug":"unsupported-elastic-search-client-version","errorCode":null,"errorMessage":"Unsupported elastic search client version","messagePattern":"Unsupported elastic search client version","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Handler/ElasticsearchHandler.php","lineNumber":216,"sourceCode":"     * @param mixed[]|Elasticsearch $responses returned by $this->client->bulk()\n     */\n    protected function createExceptionFromResponses($responses): Throwable\n    {\n        foreach ($responses['items'] ?? [] as $item) {\n            if (isset($item['index']['error'])) {\n                return $this->createExceptionFromError($item['index']['error']);\n            }\n        }\n\n        if (class_exists(ElasticInvalidArgumentException::class)) {\n            return new ElasticInvalidArgumentException('Elasticsearch failed to index one or more records.');\n        }\n\n        if (class_exists(ElasticsearchRuntimeException::class)) {\n            return new ElasticsearchRuntimeException('Elasticsearch failed to index one or more records.');\n        }\n\n        throw new \\LogicException('Unsupported elastic search client version');\n    }\n\n    /**\n     * Creates elasticsearch exception from error array\n     *\n     * @param mixed[] $error\n     */\n    protected function createExceptionFromError(array $error): Throwable\n    {\n        $previous = isset($error['caused_by']) ? $this->createExceptionFromError($error['caused_by']) : null;\n\n        if (class_exists(ElasticInvalidArgumentException::class)) {\n            return new ElasticInvalidArgumentException($error['type'] . ': ' . $error['reason'], 0, $previous);\n        }\n\n        if (class_exists(ElasticsearchRuntimeException::class)) {\n            return new ElasticsearchRuntimeException($error['type'].': '.$error['reason'], 0, $previous);\n        }","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Handler/ElasticsearchHandler.php#L198-L234","documentation":"Error \"Unsupported elastic search client version\" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Handler/ElasticsearchHandler.php:216 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"57eb1028342134e701e77c617565d51b6e5a2a53","analyzedAt":"2026-08-17T02:36:30.259Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}