
    <i                    D    S r SSKJr  SSKrSSKJr   " S S\5      rS/rg)z#Exceptions used in the auth system.    )annotationsN)Mappingc                  N    \ rS rSrSr   S       S	S jjrS
S jrS
S jrSrg)HTTPException	   aW  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                n    Uc   [         R                  " U5      R                  nXl        X l        X0l        g )N)http
HTTPStatusphrasestatus_codedetailheaders)selfr   r   r   s       m/home/dmtnaga/Documents/work/airagagent/rag_env/lib/python3.13/site-packages/langgraph_sdk/auth/exceptions.py__init__HTTPException.__init__'   s-     >__[188F&    c                8    U R                    SU R                   3$ )Nz: )r   r   )r   s    r   __str__HTTPException.__str__3   s    ""#2dkk]33r   c                p    U R                   R                  nU SU R                  < SU R                  < S3$ )Nz(status_code=z	, detail=))	__class____name__r   r   )r   
class_names     r   __repr__HTTPException.__repr__6   s6    ^^,,
]4+;+;*>iVWXXr   )r   r   r   )i  NN)r   intr   z
str | Noner   zMapping[str, str] | NonereturnNone)r   str)	r   
__module____qualname____firstlineno____doc__r   r   r   __static_attributes__ 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   