o
    ;h>                     @  sJ   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 dej	Z
d	S )
zerrors and exceptions.    )annotations)Response)
exceptions   )Limitc                      s$   e Zd ZdZdd fd	d
Z  ZS )RateLimitExceededz*Exception raised when a rate limit is hit.Nlimitr   responseResponse | NonereturnNonec                   sJ   || _ || _|jrt|js|jn| }nt|j }t j||d dS )aG  
        :param limit: The actual rate limit that was hit.
         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`
        )descriptionr	   N)r   r	   error_messagecallablestrsuper__init__)selfr   r	   r   	__class__ G/var/www/html/venv/lib/python3.10/site-packages/flask_limiter/errors.pyr      s   
zRateLimitExceeded.__init__)N)r   r   r	   r
   r   r   )__name__
__module____qualname____doc__r   __classcell__r   r   r   r   r      s    r   N)r   
__future__r   Zflask.wrappersr   Zwerkzeugr   Zwrappersr   ZTooManyRequestsr   r   r   r   r   <module>   s    