异常日志完善

This commit is contained in:
zhaoqingliang
2025-10-30 18:25:03 +08:00
parent 89af7cd0a4
commit 39911d78ab
10 changed files with 142 additions and 9 deletions

View File

@ -4,3 +4,14 @@ class ProviderConfigurationError(RuntimeError):
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