Coverage for src/local_deep_research/web_search_engines/rate_limiting/exceptions.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-22 21:20 +0000

1""" 

2Rate limiting specific exceptions for search engines. 

3""" 

4 

5 

6class RateLimitError(Exception): 

7 """Raised when a search engine hits rate limits.""" 

8 

9 def __init__( 

10 self, message: str = "Rate limit reached", *, retry_after=None 

11 ): 

12 super().__init__(message) 

13 self.retry_after = retry_after 

14 

15 

16class AdaptiveRetryError(Exception): 

17 """Raised when adaptive retry fails after all attempts.""" 

18 

19 pass 

20 

21 

22class RateLimitConfigError(Exception): 

23 """Raised when there's an issue with rate limit configuration.""" 

24 

25 pass