File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 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:
1717.. autoclass :: RequestError
1818.. autoclass :: AuthenticationException
1919.. autoclass :: AuthorizationException
20+ .. autoclass :: ApiUnavailableException
2021.. autoclass :: UnsupportedProductError
2122
2223Transport and Connection Errors
Original file line number Diff line number Diff line change 4747from .exceptions import ElasticsearchDeprecationWarning # noqa: F401
4848from .exceptions import (
4949 ApiError ,
50+ ApiUnavailableException ,
5051 AuthenticationException ,
5152 AuthorizationException ,
5253 BadRequestError ,
6970
7071__all__ = [
7172 "ApiError" ,
73+ "ApiUnavailableException" ,
7274 "AsyncElasticsearch" ,
7375 "BadRequestError" ,
7476 "Elasticsearch" ,
Original file line number Diff line number Diff line change 3636 "NotFoundError" ,
3737 "ConflictError" ,
3838 "BadRequestError" ,
39+ "ApiUnavailableException" ,
3940]
4041
4142
@@ -109,6 +110,10 @@ class AuthorizationException(ApiError):
109110 """Exception representing a 403 status code."""
110111
111112
113+ class ApiUnavailableException (ApiError ):
114+ """Exception representing a 410 status code."""
115+
116+
112117class ElasticsearchWarning (TransportWarning ):
113118 """Warning that is raised when a deprecated option
114119 or incorrect usage is flagged via the 'Warning' HTTP header.
@@ -126,4 +131,5 @@ class ElasticsearchWarning(TransportWarning):
126131 403 : AuthorizationException ,
127132 404 : NotFoundError ,
128133 409 : ConflictError ,
134+ 410 : ApiUnavailableException ,
129135}
You can’t perform that action at this time.
0 commit comments