3 ]j @sdddddddddd d d g ZGd ddeZGd ddeZGdddeZGdddeZGdddeZGdddeZGdd d eZGdddeZ GdddeZ GdddeZ Gdd d eZ Gdd d eZ e 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__rrA/tmp/pip-build-z81i1n8o/elasticsearch/elasticsearch/exceptions.pyrsc@seZdZdZdS)rz Base class for all exceptions raised by this package's operations (doesn't apply to :class:`~elasticsearch.ImproperlyConfigured`). N)r rrrrrrrrsc@seZdZdZdS)rz[ Data passed in failed to serialize properly in the ``Serializer`` being used. N)r rrrrrrrrsc@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. )args)selfrrr status_code,szTransportError.status_codecCs |jdS)z A string error message. )r)rrrrerror4szTransportError.errorcCs |jdS)zn Dict of returned error info from ES, where available, underlying exception when not. )r)rrrrinfo9szTransportError.infocCsd}yp|jrrd|jkrrt|jdtrd|jddd}djtdt|d|jd|jdg}nt|jd}Wntk rYnXdjtdt|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__As  "zTransportError.__str__N) r rrrpropertyrrrr)rrrrr%s    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&r )rrrrr)aszConnectionError.__str__N)r rrrr)rrrrrZsc@seZdZdZdS)r z, Error raised when encountering SSL errors. N)r rrrrrrrr isc@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)pszConnectionTimeout.__str__N)r rrrr)rrrrr msc@seZdZdZdS)rz+ Exception representing a 404 status code. N)r rrrrrrrrwsc@seZdZdZdS)rz+ Exception representing a 409 status code. N)r rrrrrrrr{sc@seZdZdZdS)rz+ Exception representing a 400 status code. N)r rrrrrrrrsc@seZdZdZdS)r z+ Exception representing a 401 status code. N)r rrrrrrrr sc@seZdZdZdS)r z+ Exception representing a 403 status code. N)r rrrrrrrr s)iiiiiN)__all__ Exceptionrrrrrr r rrrr r ZHTTP_EXCEPTIONSrrrrs85