{"record":{"id":"b4ac599507246dfa","repo":"Seldaek/monolog","slug":"error-sending-messages-to-elasticsearch-b4ac59","errorCode":null,"errorMessage":"Error sending messages to Elasticsearch","messagePattern":"Error sending messages to Elasticsearch","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Handler/ElasticaHandler.php","lineNumber":139,"sourceCode":"    {\n        $documents = $this->getFormatter()->formatBatch($records);\n        $this->bulkSend($documents);\n    }\n\n    /**\n     * Use Elasticsearch bulk API to send list of documents\n     *\n     * @param Document[] $documents\n     *\n     * @throws \\RuntimeException\n     */\n    protected function bulkSend(array $documents): void\n    {\n        try {\n            $this->client->addDocuments($documents);\n        } catch (ExceptionInterface | TransportException $e) {\n            if (!$this->options['ignore_error']) {\n                throw new \\RuntimeException(\"Error sending messages to Elasticsearch\", 0, $e);\n            }\n        }\n    }\n}\n","sourceCodeStart":121,"sourceCodeEnd":144,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Handler/ElasticaHandler.php#L121-L144","documentation":"Error \"Error sending messages to Elasticsearch\" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Handler/ElasticaHandler.php:139 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"}