a Y7 @sgdZGdddeZGdddeZGdddeZGdddeZGd d d eZGd d d eZGd ddeZGdddeZ GdddeZ GdddeZ GdddeZ GdddeZ e e e e e dZdS)) ImproperlyConfiguredElasticsearchExceptionSerializationErrorTransportError NotFoundError ConflictError RequestErrorConnectionErrorSSLErrorConnectionTimeoutc@seZdZdZdS)rz[ Exception raised when the config passed to the client is inconsistent or invalid. N__name__ __module__ __qualname____doc__rr?/Users/ymaher/Downloads/lambdas_org/elasticsearch/exceptions.pyrsrc@seZdZdZdS)rz Base class for all exceptions raised by this package's operations (doesn't apply to :class:`~elasticsearch.ImproperlyConfigured`). Nr rrrrr src@seZdZdZdS)rz[ Data passed in failed to serialize properly in the ``Serializer`` being used. Nr rrrrrsrc@s<eZdZdZeddZeddZeddZdd Zd S) rz Exception raised when ES returns a non-OK (>=400) HTTP status code. Or when an actual connection error happens; in that case the ``status_code`` will be set to ``'N/A'``. cCs |jdS)zz The HTTP status code of the response that precipitated the error or ``'N/A'`` if not applicable. argsselfrrr status_code!szTransportError.status_codecCs |jdS)z A string error message. rrrrrerror)szTransportError.errorcCs |jdS)z7 Dict of returned error info from ES, where available. rrrrrinfo.szTransportError.infocCsNd}z$|jr&d|jdddd}Wnty:Yn0d|j|j|fS)Nz, %rrZ root_causerreasonzTransportError(%s, %r%s))r LookupErrorrr)rcauserrr__str__3s zTransportError.__str__N) r r rrpropertyrrrr rrrrrs   rc@seZdZdZddZdS)rz Error raised when there was an exception while talking to ES. Original exception from the underlying :class:`~elasticsearch.Connection` implementation is available as ``.info.`` cCsd|j|jjj|jfS)Nz%ConnectionError(%s) caused by: %s(%s))rr __class__r rrrrr CszConnectionError.__str__Nr r rrr rrrrr=src@seZdZdZdS)r z, Error raised when encountering SSL errors. Nr rrrrr Hsr c@seZdZdZddZdS)r z; A network timeout. Doesn't cause a node retry by default. cCsd|jjj|jfS)Nz$ConnectionTimeout caused by - %s(%s))rr"r rrrrr Ns zConnectionTimeout.__str__Nr#rrrrr Lsr c@seZdZdZdS)rz+ Exception representing a 404 status code. Nr rrrrrSsrc@seZdZdZdS)rz+ Exception representing a 409 status code. Nr rrrrrWsrc@seZdZdZdS)rz+ Exception representing a 400 status code. Nr rrrrr[src@seZdZdZdS)AuthenticationExceptionz+ Exception representing a 401 status code. Nr rrrrr$_sr$c@seZdZdZdS)AuthorizationExceptionz+ Exception representing a 403 status code. Nr rrrrr%csr%)iiiiiN)__all__ Exceptionrrrrrr r rrrr$r%HTTP_EXCEPTIONSrrrrs$"