Skip to content

Commit f1be494

Browse files
committed
[7.14] Document 'UnsupportedProductError'
1 parent dfdf5f2 commit f1be494

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

docs/sphinx/exceptions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ Exceptions
2323
.. autoclass:: RequestError(TransportError)
2424
.. autoclass:: AuthenticationException(TransportError)
2525
.. autoclass:: AuthorizationException(TransportError)
26+
.. autoclass:: UnsupportedProductError

docs/sphinx/transports.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ Product check on first request
2626

2727
Starting in v7.14.0 the client performs a required product check before
2828
the first API call is executed. This product check allows the client to
29-
establish that it's communicating with a valid Elasticsearch cluster.
29+
establish that it's communicating with a supported Elasticsearch cluster.
3030

3131
The product check requires a single HTTP request to the ``info`` API. In
3232
most cases this request will succeed quickly and then no further product
3333
check HTTP requests will be sent.
3434

3535
The product check will verify that the ``X-Elastic-Product: Elasticsearch``
36-
HTTP header is being sent or if the ``info`` API response has proper values
37-
of ``tagline`` and ``version.build_flavor``.
38-
39-
If the client detects that it's not connected to Elasticsearch the
40-
``NotElasticsearchError`` exception will be raised. In previous versions
41-
of Elasticsearch the ``info`` API required additional permissions so
42-
if an authentication or authorization error is raised during the
43-
product check then an ``ElasticsearchWarning`` is raised and the client
36+
HTTP header is being sent or if the ``info`` API indicates a supported
37+
distribution of Elasticsearch.
38+
39+
If the client detects that it's not connected to a supported distribution of
40+
Elasticsearch the ``UnsupportedProductError`` exception will be raised.
41+
In previous versions of Elasticsearch the ``info`` API required additional
42+
permissions so if an authentication or authorization error is raised during
43+
the product check then an ``ElasticsearchWarning`` is raised and the client
4444
proceeds normally.
4545

4646
.. py:module:: elasticsearch.connection

elasticsearch/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
SerializationError,
5252
SSLError,
5353
TransportError,
54+
UnsupportedProductError,
5455
)
5556
from .serializer import JSONSerializer
5657
from .transport import Transport
@@ -81,6 +82,7 @@
8182
"ConnectionTimeout",
8283
"AuthenticationException",
8384
"AuthorizationException",
85+
"UnsupportedProductError",
8486
"ElasticsearchWarning",
8587
"ElasticsearchDeprecationWarning",
8688
]

elasticsearch/__init__.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ from .exceptions import RequestError as RequestError
4040
from .exceptions import SerializationError as SerializationError
4141
from .exceptions import SSLError as SSLError
4242
from .exceptions import TransportError as TransportError
43+
from .exceptions import UnsupportedProductError as UnsupportedProductError
4344
from .serializer import JSONSerializer as JSONSerializer
4445
from .transport import Transport as Transport
4546

0 commit comments

Comments
 (0)