
    9i*                    b    d Z ddlmZ ddlmZ ddlmZ ddlmZ  G d dej                        Z
y	)
zerrors and exceptions.    )annotations)Response)
exceptions   )RuntimeLimitc                  &     e Zd ZdZdd fdZ xZS )RateLimitExceededz*Exception raised when a rate limit is hit.c                    || _         || _        |j                  r2t        |j                        s|j                  n|j                         }nt	        |j                         }t
        |   ||       y)aF  
        :param limit: The actual rate limit that was hit. This is used to construct the default
         response message
        :param response: Optional pre constructed response. If provided it will be rendered by
         flask instead of the default error response of :class:`~werkzeug.exceptions.HTTPException`
        )descriptionresponseN)limitr   error_messagecallablestrsuper__init__)selfr   r   r   	__class__s       G/var/www/html/venv/lib/python3.12/site-packages/flask_limiter/errors.pyr   zRateLimitExceeded.__init__   sd     
 +3E4G4G+H##eNaNaNc  ekk*K[8D    )N)r   r   r   zResponse | NonereturnNone)__name__
__module____qualname____doc__r   __classcell__)r   s   @r   r	   r	      s    4E Er   r	   N)r   
__future__r   flask.wrappersr   werkzeugr   _limitsr   TooManyRequestsr	    r   r   <module>r$      s(     " #  !E
22 Er   