diff --git a/src/anthropic/__init__.py b/src/anthropic/__init__.py index 1994c9db..3eac9fc7 100644 --- a/src/anthropic/__init__.py +++ b/src/anthropic/__init__.py @@ -21,6 +21,7 @@ APIError, ConflictError, NotFoundError, + AnthropicError, APIStatusError, RateLimitError, APITimeoutError, @@ -40,6 +41,7 @@ "NoneType", "Transport", "ProxiesTypes", + "AnthropicError", "APIError", "APIStatusError", "APITimeoutError", diff --git a/src/anthropic/_exceptions.py b/src/anthropic/_exceptions.py index cfcd58af..aef58337 100644 --- a/src/anthropic/_exceptions.py +++ b/src/anthropic/_exceptions.py @@ -18,7 +18,11 @@ ] -class APIError(Exception): +class AnthropicError(Exception): + pass + + +class APIError(AnthropicError): message: str request: httpx.Request