_Y7 @sTdddddddddd g ZGd ddeZGd ddeZGd ddeZGd ddeZGdddeZGdddeZGdd d eZGdddeZ GdddeZ GdddeZ GdddeZ GdddeZ de de de de de iZdS)ImproperlyConfiguredElasticsearchExceptionSerializationErrorTransportError NotFoundError ConflictError RequestErrorConnectionErrorSSLErrorConnectionTimeoutc@seZdZdZdS)rz[ Exception raised when the config passed to the client is inconsistent or invalid. N)__name__ __module__ __qualname____doc__rrA/tmp/pip-build-66pc0izb/elasticsearch/elasticsearch/exceptions.pyrs c@seZdZdZdS)rz Base class for all exceptions raised by this package's operations (doesn't apply to :class:`~elasticsearch.ImproperlyConfigured`). N)r r r rrrrrr s c@seZdZdZdS)rz[ Data passed in failed to serialize properly in the ``Serializer`` being used. N)r r r rrrrrrs c@sXeZdZdZeddZeddZeddZdd 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)rrrrerror)szTransportError.errorcCs |jdS)z7 Dict of returned error info from ES, where available. )r)rrrrinfo.szTransportError.infoc Cs\d}y*|jr/d|jdddd}Wntk rDYnXd|j|j|fS)Nz, %rrZ root_causerreasonzTransportError(%s, %r%s))r LookupErrorrr)rcauserrr__str__3s ! zTransportError.__str__N) r r r rpropertyrrrrrrrrrs c@s"eZdZdZddZdS)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.`` cCs d|j|jjj|jfS)Nz%ConnectionError(%s) caused by: %s(%s))rr __class__r )rrrrrCszConnectionError.__str__N)r r r rrrrrrr=s c@seZdZdZdS)r z, Error raised when encountering SSL errors. N)r r r rrrrrr Hs c@s"eZdZdZddZdS)r z; A network timeout. Doesn't cause a node retry by default. cCsd|jjj|jfS)Nz$ConnectionTimeout caused by - %s(%s))rrr )rrrrrNszConnectionTimeout.__str__N)r r r rrrrrrr Ls c@seZdZdZdS)rz+ Exception representing a 404 status code. N)r r r rrrrrrSs c@seZdZdZdS)rz+ Exception representing a 409 status code. N)r r r rrrrrrWs c@seZdZdZdS)rz+ Exception representing a 400 status code. N)r r r rrrrrr[s c@seZdZdZdS)AuthenticationExceptionz+ Exception representing a 401 status code. N)r r r rrrrrr _s r c@seZdZdZdS)AuthorizationExceptionz+ Exception representing a 403 status code. N)r r r rrrrrr!cs r!iiiiiN)__all__ Exceptionrrrrrr r rrrr r!ZHTTP_EXCEPTIONSrrrrs&  "