Exceptions & Warnings
API Errors
These errors are triggered from an HTTP response that isn’t 2XX:
- class elasticsearch_serverless.ApiError(message: str, meta: ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
- class elasticsearch_serverless.NotFoundError(message: str, meta: ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
Exception representing a 404 status code.
- class elasticsearch_serverless.ConflictError(message: str, meta: ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
Exception representing a 409 status code.
- elasticsearch_serverless.RequestError
alias of
BadRequestError
- class elasticsearch_serverless.AuthenticationException(message: str, meta: ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
Exception representing a 401 status code.
Transport and Connection Errors
These errors are triggered by an error occurring before an HTTP response arrives:
- class elasticsearch_serverless.TransportError(message: Any, errors: Tuple[Exception, ...] = ())
Generic exception for the ‘elastic-transport’ package.
For the ‘errors’ attribute, errors are ordered from most recently raised (index=0) to least recently raised (index=N)
If an HTTP status code is available with the error it will be stored under ‘status’. If HTTP headers are available they are stored under ‘headers’.
- class elasticsearch_serverless.SerializationError(message: Any, errors: Tuple[Exception, ...] = ())
Error that occurred during the serialization or deserialization of an HTTP message body
- class elasticsearch_serverless.ConnectionError(message: Any, errors: Tuple[Exception, ...] = ())
Error raised by the HTTP connection
Warnings
- class elasticsearch_serverless.ElasticsearchWarning
Warning that is raised when a deprecated option or incorrect usage is flagged via the ‘Warning’ HTTP header.