ó
º9—^c           @   st  d  d l  Z  d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d	 „  ƒ  YZ d
 e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ	 d e f d „  ƒ  YZ
 d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ i e d 6e d 6e d 6e d 6e d 6e d 6e	 d  6e
 d! 6e d" 6e d# 6e d$ 6Z d% „  Z d S(&   iÿÿÿÿNt	   HTTPErrorc           B   s&   e  Z d  Z d „  Z e d „  ƒ Z RS(   s    Base of all other errorsc         C   s7   | j  |  _ | j |  _ | j ƒ  |  _ | j |  _ d  S(   N(   t   codet   status_codet   reasont   readt   bodyt   hdrst   headers(   t   selft   error(    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyt   __init__   s    c         C   s   t  j |  j j d ƒ ƒ S(   s>   
        :return: dict of response error from the API
        s   utf-8(   t   jsont   loadsR   t   decode(   R   (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyt   to_dict   s    (   t   __name__t
   __module__t   __doc__R
   t   propertyR   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyR       s   	t   BadRequestsErrorc           B   s   e  Z RS(    (   R   R   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyR      s   t   UnauthorizedErrorc           B   s   e  Z RS(    (   R   R   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyR      s   t   ForbiddenErrorc           B   s   e  Z RS(    (   R   R   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyR      s   t   NotFoundErrorc           B   s   e  Z RS(    (   R   R   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyR   !   s   t   MethodNotAllowedErrorc           B   s   e  Z RS(    (   R   R   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyR   %   s   t   PayloadTooLargeErrorc           B   s   e  Z RS(    (   R   R   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyR   )   s   t   UnsupportedMediaTypeErrorc           B   s   e  Z RS(    (   R   R   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyR   -   s   t   TooManyRequestsErrorc           B   s   e  Z RS(    (   R   R   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyR   1   s   t   InternalServerErrorc           B   s   e  Z RS(    (   R   R   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyR   5   s   t   ServiceUnavailableErrorc           B   s   e  Z RS(    (   R   R   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyR   9   s   t   GatewayTimeoutErrorc           B   s   e  Z RS(    (   R   R   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyR   =   s   i  i‘  i“  i”  i•  i  iŸ  i­  iô  i÷  iø  c         C   s6   y t  |  j |  ƒ } Wn t k
 r1 t |  ƒ SX| S(   N(   t   err_dictR   t   KeyErrorR    (   R	   t   exc(    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyt   handle_errorP   s
    (   R   t	   ExceptionR    R   R   R   R   R   R   R   R   R   R   R   R   R!   (    (    (    s?   /tmp/pip-unpacked-wheel-vZkhRb/python_http_client/exceptions.pyt   <module>   s2   
