Coverage for src / ai_lls_lib / providers / exceptions.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-05-06 23:45 +0000

1"""Exception classes for verification providers.""" 

2 

3 

4class ProviderError(ValueError): 

5 """Raised when an upstream verification provider fails. 

6 

7 Extends ValueError for backward compatibility with existing 

8 error handlers. Carries an optional HTTP status code from the 

9 upstream response so callers can distinguish client errors from 

10 server/network failures. 

11 """ 

12 

13 def __init__(self, message: str, status_code: int | None = None): 

14 super().__init__(message) 

15 self.status_code = status_code