Added documentation for exceptions raised by elasticsearch-py

Fixes #58, thanks, willkg, for the report!
This commit is contained in:
Honza Král
2014-03-08 18:50:36 +01:00
parent 866e6c5035
commit 152e133cc2
4 changed files with 60 additions and 17 deletions
+9 -6
View File
@@ -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::
+20
View File
@@ -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)
+1
View File
@@ -123,6 +123,7 @@ Contents
:maxdepth: 2
api
exceptions
connection
transports
helpers