Ë
    òÏjÐ  ã                  óD   — d Z ddlmZ ddlZddlmZ  G d„ de«      ZdgZy)z#Exceptions used in the auth system.é    )ÚannotationsN)ÚMappingc                  ó>   — e Zd ZdZ	 	 	 d	 	 	 	 	 	 	 dd„Zdd„Zdd„Zy)	ÚHTTPExceptiona±  HTTP exception that you can raise to return a specific HTTP error response.

    Since this is defined in the auth module, we default to a 401 status code.

    Args:
        status_code: HTTP status code for the error. Defaults to 401 "Unauthorized".
        detail: Detailed error message. If `None`, uses a default
            message based on the status code.
        headers: Additional HTTP headers to include in the error response.

    Example:
        Default:
        ```python
        raise HTTPException()
        # HTTPException(status_code=401, detail='Unauthorized')
        ```

        Add headers:
        ```python
        raise HTTPException(headers={"X-Custom-Header": "Custom Value"})
        # HTTPException(status_code=401, detail='Unauthorized', headers={"WWW-Authenticate": "Bearer"})
        ```

        Custom error:
        ```python
        raise HTTPException(status_code=404, detail="Not found")
        ```
    Nc                óp   — |€t        j                  |«      j                  }|| _        || _        || _        y )N)ÚhttpÚ
HTTPStatusÚphraseÚstatus_codeÚdetailÚheaders)Úselfr   r   r   s       úZ/var/www/html/gaurav-v2/venv/lib/python3.12/site-packages/langgraph_sdk/auth/exceptions.pyÚ__init__zHTTPException.__init__'   s3   € ð ˆ>Ü—_‘_ [Ó1×8Ñ8ˆFØ&ˆÔØˆŒØˆ�ó    c                ó8   — | j                   › d| j                  › �S )Nz: )r   r   )r   s    r   Ú__str__zHTTPException.__str__3   s   € Ø×"Ñ"Ð# 2 d§k¡k ]Ð3Ð3r   c                ól   — | j                   j                  }|› d| j                  ›d| j                  ›d�S )Nz(status_code=z	, detail=Ú))Ú	__class__Ú__name__r   r   )r   Ú
class_names     r   Ú__repr__zHTTPException.__repr__6   s6   € Ø—^‘^×,Ñ,ˆ
Ø�˜]¨4×+;Ñ+;Ð*>¸iÈÏÉÀÐVWÐXÐXr   )i‘  NN)r   Úintr   z
str | Noner   zMapping[str, str] | NoneÚreturnÚNone)r   Ústr)r   Ú
__module__Ú__qualname__Ú__doc__r   r   r   © r   r   r   r   	   sH   „ ñð> Ø!Ø,0ð	
àð
ð ð
ð *ð	
ð
 
ó
ó4ôYr   r   )	r    Ú
__future__r   r   Úcollections.abcr   Ú	Exceptionr   Ú__all__r!   r   r   Ú<module>r&      s*   ðÙ )å "ã Ý #ô/Y�Iô /Yðd Ð
�r   