
    c
i                    L    d Z ddlmZ ddlZddlmZ  G d de          ZdgZdS )z#Exceptions used in the auth system.    )annotationsN)Mappingc                  2    e Zd ZdZ	 	 	 dddZddZddZdS )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")
        ```
      Nstatus_codeintdetail
str | NoneheadersMapping[str, str] | NonereturnNonec                f    |t          j        |          j        }|| _        || _        || _        d S )N)http
HTTPStatusphraser   r
   r   )selfr   r
   r   s       C:\Users\Dell Inspiron 16\Desktop\tws\AgrotaPowerBi\back-agrota-powerbi\mcp-client-agrota\venv\Lib\site-packages\langgraph_sdk/auth/exceptions.py__init__zHTTPException.__init__'   s5     >_[118F&    strc                $    | j          d| j         S )Nz: )r   r
   )r   s    r   __str__zHTTPException.__str__3   s    "33dk333r   c                D    | 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   s0    ^,
XX4+;XXXXXXr   )r   NN)r   r	   r
   r   r   r   r   r   )r   r   )r   
__module____qualname____doc__r   r   r     r   r   r   r   	   sp         > !,0	
 
 
 
 
4 4 4 4Y Y Y Y Y Yr   r   )	r#   
__future__r   r   collections.abcr   	Exceptionr   __all__r$   r   r   <module>r)      sy    ) ) " " " " " "  # # # # # #/Y /Y /Y /Y /YI /Y /Y /Yd 
r   