
    %Gg                     4    d Z ddlZddlZ G d de      ZdgZy)z#Exceptions used in the auth system.    Nc            
           e Zd ZdZ	 	 	 d
dedej                  e   dej                  ej                  eef      ddfdZ	defdZ
def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 (int, optional): HTTP status code for the error. Defaults to 401 "Unauthorized".
        detail (str | None, optional): Detailed error message. If None, uses a default
            message based on the status code.
        headers (typing.Mapping[str, str] | None, optional): 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")
        ```
    Nstatus_codedetailheadersreturnc                 p    |t        j                  |      j                  }|| _        || _        || _        y )N)http
HTTPStatusphraser   r   r   )selfr   r   r   s       z/home/kushmeetdev/apache_webroot/langgraph_flaskproject/venv/lib/python3.12/site-packages/langgraph_sdk/auth/exceptions.py__init__zHTTPException.__init__&   s3     >__[188F&    c                 8    | j                    d| j                   S )Nz: )r   r   )r   s    r   __str__zHTTPException.__str__2   s    ""#2dkk]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__5   s6    ^^,,
]4+;+;*>iVWXXr   )i  NN)r   
__module____qualname____doc__inttypingOptionalstrMappingr   r   r    r   r   r   r      sw    @ '+=A	

 $
 S!9:	

 

4 4Y# Yr   r   )r   r
   r   	Exceptionr   __all__r!   r   r   <module>r$      s'    )  0YI 0Yf 
r   