WARNING: Version 5.x has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. 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. |
|
Generated in case of all connections present in the connection pool are dead. |
|
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 |