taolib.testing.rate_limiter.errors#

Rate limiter custom exceptions.

Exceptions#

RateLimitExceededError

限流阈值超出异常。

Module Contents#

exception taolib.testing.rate_limiter.errors.RateLimitExceededError(*, limit: int, window_seconds: int, retry_after: int, identifier: str)#

Bases: Exception

限流阈值超出异常。

当请求频率超过配置的限流阈值时抛出。

limit#

限流阈值

window_seconds#

滑动窗口大小(秒)

retry_after#

建议重试等待时间(秒)

identifier#

被限流的标识符(用户ID或IP)

reset_timestamp#

窗口重置时间戳

limit#
window_seconds#
retry_after#
identifier#
reset_timestamp#