NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Error handling
editError handling
editThe client exposes a variety of error objects, that you can use to enhance your error handling.
You can find all the error objects inside the errors
key in the client.
const { errors } = require('@elastic/elasticsearch') console.log(errors)
Following you can find the errors exported by the client.
|
Every error inherits from this class, it is the basic error generated by the client. |
|
Generated when a request exceeds the |
|
Generated when an error occurs during the reequest, it can be a connection error or a malformed stream of data. |
|
Given the configuration, the ConnectionPool was not able to find a usable Connection for this request. |
|
Generated if the serialization fails. |
|
Generated if the deserialization fails. |
|
Generated if there is a malformed configuration or parameter. |
|
Generated when in case of a |