U Dc_ @sdddddddddd d d g ZGd ddeZGd ddeZGdddeZGdddeZGdddeZGdddeZGdd d eZGdddeZ GdddeZ GdddeZ Gdd d eZ Gdd d eZ GdddeZe e e e e dZdS)ImproperlyConfiguredElasticsearchExceptionSerializationErrorTransportError NotFoundError ConflictError RequestErrorConnectionErrorSSLErrorConnectionTimeoutAuthenticationExceptionAuthorizationExceptionc@seZdZdZdS)rz[ Exception raised when the config passed to the client is inconsistent or invalid. N__name__ __module__ __qualname____doc__rr?/tmp/pip-target-m1bursmm/lib/python/elasticsearch/exceptions.pyr"sc@seZdZdZdS)rz Base class for all exceptions raised by this package's operations (doesn't apply to :class:`~elasticsearch.ImproperlyConfigured`). Nr rrrrr(sc@seZdZdZdS)rz[ Data passed in failed to serialize properly in the ``Serializer`` being used. Nr rrrrr/sc@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. rrrrrerrorEszTransportError.errorcCs |jdS)zn Dict of returned error info from ES, where available, underlying exception when not. rrrrrinfoJszTransportError.infoc Csd}zp|jrrd|jkrrt|jdtrd|jddd}dtdt|d|d|dg}nt|jd}Wntk rYnXdtdt|j t|j |g}d |j j |fS) Nr root_causerz, reasonz resource.idz resource.typez%s(%s)) r isinstancedictjoinfilterreprget LookupErrorstrrr __class__r)rcausermsgrrr__str__Rs&  "zTransportError.__str__N) rrrrpropertyrrrr,rrrrr6s   c@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))rrr)rrrrrr,rs zConnectionError.__str__Nrrrrr,rrrrrksc@seZdZdZdS)r z, Error raised when encountering SSL errors. Nr rrrrr zsc@seZdZdZddZdS)r z; A network timeout. Doesn't cause a node retry by default. cCsd|jjj|jfS)Nz$ConnectionTimeout caused by - %s(%s))rr)rrrrrr,szConnectionTimeout.__str__Nr.rrrrr ~sc@seZdZdZdS)rz+ Exception representing a 404 status code. Nr rrrrrsc@seZdZdZdS)rz+ Exception representing a 409 status code. Nr rrrrrsc@seZdZdZdS)rz+ Exception representing a 400 status code. Nr rrrrrsc@seZdZdZdS)r z+ Exception representing a 401 status code. Nr rrrrr sc@seZdZdZdS)r z+ Exception representing a 403 status code. Nr rrrrr sc@seZdZdZdS)ElasticsearchDeprecationWarningzc Warning that is raised when a deprecated option is flagged via the 'Warning' HTTP header. Nr rrrrr/sr/)iiiiiN)__all__ Exceptionrrrrrr r rrrr r Warningr/ZHTTP_EXCEPTIONSrrrrs>5