Exceptions¶
-
class
elasticsearch.
ImproperlyConfigured
¶ Exception raised when the config passed to the client is inconsistent or invalid.
-
class
elasticsearch.
ElasticsearchException
¶ Base class for all exceptions raised by this package’s operations (doesn’t apply to
ImproperlyConfigured
).
-
class
elasticsearch.
SerializationError
(ElasticsearchException)¶ Data passed in failed to serialize properly in the
Serializer
being used.
-
class
elasticsearch.
TransportError
(ElasticsearchException)¶ Exception raised when ES returns a non-OK (>=400) HTTP status code. Or when an actual connection error happens; in that case the
status_code
will be set to'N/A'
.-
error
¶ A string error message.
-
info
¶ Dict of returned error info from ES, where available, underlying exception when not.
-
status_code
¶ The HTTP status code of the response that precipitated the error or
'N/A'
if not applicable.
-
-
class
elasticsearch.
ConnectionError
(TransportError)¶ Error raised when there was an exception while talking to ES. Original exception from the underlying
Connection
implementation is available as.info
.
-
class
elasticsearch.
ConnectionTimeout
(ConnectionError)¶ A network timeout. Doesn’t cause a node retry by default.
-
class
elasticsearch.
SSLError
(ConnectionError)¶ Error raised when encountering SSL errors.
-
class
elasticsearch.
NotFoundError
(TransportError)¶ Exception representing a 404 status code.
-
class
elasticsearch.
ConflictError
(TransportError)¶ Exception representing a 409 status code.
-
class
elasticsearch.
RequestError
(TransportError)¶ Exception representing a 400 status code.
-
class
elasticsearch.
AuthenticationException
(TransportError)¶ Exception representing a 401 status code.
-
class
elasticsearch.
AuthorizationException
(TransportError)¶ Exception representing a 403 status code.