
    uLf                     Z    d dl mZmZmZ d dlmZ d dlmZ  G d de      Z	dede	defd	Z
y
)    )AnyOptionalDict)Request)JSONResponsec            
       F    e Zd Z	 	 ddededeeeef      ddfdZdefdZ	y)	HTTPExceptionNstatus_codecontentheadersreturnc                 .    || _         || _        || _        y )Nr
   r   r   )selfr
   r   r   s       3/var/www/html/chat-with-data/app/exceptions/http.py__init__zHTTPException.__init__	   s     '    c                     g }| j                   j                         D ]-  \  }}|j                  d      r|j                  | d|       / | j                  j
                   ddj                  |       dS )zvClass custom __repr__ method implementation.

        Returns:
            str: HTTPException string object.

        _=(z, ))__dict__items
startswithappend	__class____name__join)r   kwargskeyvalues       r   __repr__zHTTPException.__repr__   sv     ----/ 	2JC>>#&Qui01	2 ..))*!DIIf,=+>a@@r   )NN)
r   
__module____qualname__intr   r   r   strr   r#    r   r   r	   r	      sP    
 ,0			 	 $sCx.)		
 
	A# Ar   r	   request	exceptionr   c                 b   K   t        |j                  |j                  |j                        S w)Nr   )r   r
   r   r   )r)   r*   s     r   http_exception_handlerr,   $   s.     ))!!!! s   -/N)typingr   r   r   fastapir   fastapi.responsesr   	Exceptionr	   r,   r(   r   r   <module>r1      s:    & &  *AI A:' m P\ r   