18 lines
507 B
Python
18 lines
507 B
Python
class ProviderConfigurationError(RuntimeError):
|
|
"""Raised when a provider is missing required configuration."""
|
|
|
|
|
|
class ProviderAPICallError(RuntimeError):
|
|
"""Raised when the upstream provider responds with an error."""
|
|
|
|
def __init__(
|
|
self,
|
|
message: str,
|
|
*,
|
|
status_code: int | None = None,
|
|
response_text: str | None = None,
|
|
) -> None:
|
|
super().__init__(message)
|
|
self.status_code = status_code
|
|
self.response_text = response_text
|