[7.x] Document 'UnsupportedProductError'
This commit is contained in:
@@ -23,3 +23,4 @@ Exceptions
|
|||||||
.. autoclass:: RequestError(TransportError)
|
.. autoclass:: RequestError(TransportError)
|
||||||
.. autoclass:: AuthenticationException(TransportError)
|
.. autoclass:: AuthenticationException(TransportError)
|
||||||
.. autoclass:: AuthorizationException(TransportError)
|
.. autoclass:: AuthorizationException(TransportError)
|
||||||
|
.. autoclass:: UnsupportedProductError
|
||||||
|
|||||||
@@ -26,21 +26,21 @@ Product check on first request
|
|||||||
|
|
||||||
Starting in v7.14.0 the client performs a required product check before
|
Starting in v7.14.0 the client performs a required product check before
|
||||||
the first API call is executed. This product check allows the client to
|
the first API call is executed. This product check allows the client to
|
||||||
establish that it's communicating with a valid Elasticsearch cluster.
|
establish that it's communicating with a supported Elasticsearch cluster.
|
||||||
|
|
||||||
The product check requires a single HTTP request to the ``info`` API. In
|
The product check requires a single HTTP request to the ``info`` API. In
|
||||||
most cases this request will succeed quickly and then no further product
|
most cases this request will succeed quickly and then no further product
|
||||||
check HTTP requests will be sent.
|
check HTTP requests will be sent.
|
||||||
|
|
||||||
The product check will verify that the ``X-Elastic-Product: Elasticsearch``
|
The product check will verify that the ``X-Elastic-Product: Elasticsearch``
|
||||||
HTTP header is being sent or if the ``info`` API response has proper values
|
HTTP header is being sent or if the ``info`` API indicates a supported
|
||||||
of ``tagline`` and ``version.build_flavor``.
|
distribution of Elasticsearch.
|
||||||
|
|
||||||
If the client detects that it's not connected to Elasticsearch the
|
If the client detects that it's not connected to a supported distribution of
|
||||||
``NotElasticsearchError`` exception will be raised. In previous versions
|
Elasticsearch the ``UnsupportedProductError`` exception will be raised.
|
||||||
of Elasticsearch the ``info`` API required additional permissions so
|
In previous versions of Elasticsearch the ``info`` API required additional
|
||||||
if an authentication or authorization error is raised during the
|
permissions so if an authentication or authorization error is raised during
|
||||||
product check then an ``ElasticsearchWarning`` is raised and the client
|
the product check then an ``ElasticsearchWarning`` is raised and the client
|
||||||
proceeds normally.
|
proceeds normally.
|
||||||
|
|
||||||
.. py:module:: elasticsearch.connection
|
.. py:module:: elasticsearch.connection
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ from .exceptions import (
|
|||||||
SerializationError,
|
SerializationError,
|
||||||
SSLError,
|
SSLError,
|
||||||
TransportError,
|
TransportError,
|
||||||
|
UnsupportedProductError,
|
||||||
)
|
)
|
||||||
from .serializer import JSONSerializer
|
from .serializer import JSONSerializer
|
||||||
from .transport import Transport
|
from .transport import Transport
|
||||||
@@ -81,6 +82,7 @@ __all__ = [
|
|||||||
"ConnectionTimeout",
|
"ConnectionTimeout",
|
||||||
"AuthenticationException",
|
"AuthenticationException",
|
||||||
"AuthorizationException",
|
"AuthorizationException",
|
||||||
|
"UnsupportedProductError",
|
||||||
"ElasticsearchWarning",
|
"ElasticsearchWarning",
|
||||||
"ElasticsearchDeprecationWarning",
|
"ElasticsearchDeprecationWarning",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ from .exceptions import RequestError as RequestError
|
|||||||
from .exceptions import SerializationError as SerializationError
|
from .exceptions import SerializationError as SerializationError
|
||||||
from .exceptions import SSLError as SSLError
|
from .exceptions import SSLError as SSLError
|
||||||
from .exceptions import TransportError as TransportError
|
from .exceptions import TransportError as TransportError
|
||||||
|
from .exceptions import UnsupportedProductError as UnsupportedProductError
|
||||||
from .serializer import JSONSerializer as JSONSerializer
|
from .serializer import JSONSerializer as JSONSerializer
|
||||||
from .transport import Transport as Transport
|
from .transport import Transport as Transport
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user