Added documentation for exceptions raised by elasticsearch-py
Fixes #58, thanks, willkg, for the report!
This commit is contained in:
+9
-6
@@ -3,13 +3,16 @@
|
||||
API Documentation
|
||||
=================
|
||||
|
||||
.. note::
|
||||
All the API calls map the raw REST api as closely as possible, including the
|
||||
distinction between required and optional arguments to the calls. This means
|
||||
that the code makes distinction between positional and keyword arguments; we,
|
||||
however, recommend that people *use keyword arguments for all calls for
|
||||
consistency and safety*.
|
||||
|
||||
All the API calls map the raw REST api as closely as possible, including
|
||||
the distinction between required and optional arguments to the calls. This
|
||||
means that the code makes distinction between positional and keyword arguments;
|
||||
we, however, recommend that people use keyword arguments for all calls for
|
||||
consistency and safety.
|
||||
An API call is considered successful (and will return a response) if
|
||||
elasticsearch returns a 2XX response. Otherwise an instance of
|
||||
:class:`~elasticsearch.TransportError` (or a more specific subclass) will be
|
||||
raised. You can see other exception and error states in :ref:`exceptions`.
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
.. _exceptions:
|
||||
|
||||
Exceptions
|
||||
==========
|
||||
|
||||
.. py:module:: elasticsearch
|
||||
|
||||
.. autoclass:: ImproperlyConfigured
|
||||
|
||||
.. autoclass:: ElasticsearchException
|
||||
|
||||
.. autoclass:: SerializationError(ElasticsearchException)
|
||||
|
||||
.. autoclass:: TransportError(ElasticsearchException)
|
||||
:members:
|
||||
|
||||
.. autoclass:: NotFoundError(TransportError)
|
||||
.. autoclass:: ConflictError(TransportError)
|
||||
.. autoclass:: RequestError(TransportError)
|
||||
.. autoclass:: ConnectionError(TransportError)
|
||||
@@ -123,6 +123,7 @@ Contents
|
||||
:maxdepth: 2
|
||||
|
||||
api
|
||||
exceptions
|
||||
connection
|
||||
transports
|
||||
helpers
|
||||
|
||||
Reference in New Issue
Block a user