File tree 3 files changed +9
-0
lines changed
3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ These errors are triggered from an HTTP response that isn't 2XX:
17
17
.. autoclass :: RequestError
18
18
.. autoclass :: AuthenticationException
19
19
.. autoclass :: AuthorizationException
20
+ .. autoclass :: ApiUnavailableException
20
21
.. autoclass :: UnsupportedProductError
21
22
22
23
Transport and Connection Errors
Original file line number Diff line number Diff line change 47
47
from .exceptions import ElasticsearchDeprecationWarning # noqa: F401
48
48
from .exceptions import (
49
49
ApiError ,
50
+ ApiUnavailableException ,
50
51
AuthenticationException ,
51
52
AuthorizationException ,
52
53
BadRequestError ,
69
70
70
71
__all__ = [
71
72
"ApiError" ,
73
+ "ApiUnavailableException" ,
72
74
"AsyncElasticsearch" ,
73
75
"BadRequestError" ,
74
76
"Elasticsearch" ,
Original file line number Diff line number Diff line change 36
36
"NotFoundError" ,
37
37
"ConflictError" ,
38
38
"BadRequestError" ,
39
+ "ApiUnavailableException" ,
39
40
]
40
41
41
42
@@ -109,6 +110,10 @@ class AuthorizationException(ApiError):
109
110
"""Exception representing a 403 status code."""
110
111
111
112
113
+ class ApiUnavailableException (ApiError ):
114
+ """Exception representing a 410 status code."""
115
+
116
+
112
117
class ElasticsearchWarning (TransportWarning ):
113
118
"""Warning that is raised when a deprecated option
114
119
or incorrect usage is flagged via the 'Warning' HTTP header.
@@ -126,4 +131,5 @@ class ElasticsearchWarning(TransportWarning):
126
131
403 : AuthorizationException ,
127
132
404 : NotFoundError ,
128
133
409 : ConflictError ,
134
+ 410 : ApiUnavailableException ,
129
135
}
You can’t perform that action at this time.
0 commit comments