Commit 39c29243 authored by John Wang's avatar John Wang

Merge branch 'feat/claude-api-support' into deploy/dev

parents 39481685 50615341
...@@ -119,8 +119,8 @@ class AnthropicProvider(BaseProvider): ...@@ -119,8 +119,8 @@ class AnthropicProvider(BaseProvider):
] ]
chat_llm(messages) chat_llm(messages)
except anthropic.APIConnectionError: except anthropic.APIConnectionError as ex:
raise ValidateFailedError(f"Anthropic: Connection error.") raise ValidateFailedError(f"Anthropic: Connection error, cause: {ex.__cause__}")
except (anthropic.APIStatusError, anthropic.RateLimitError) as ex: except (anthropic.APIStatusError, anthropic.RateLimitError) as ex:
raise ValidateFailedError(f"Anthropic: Error code: {ex.status_code} - " raise ValidateFailedError(f"Anthropic: Error code: {ex.status_code} - "
f"{ex.body['error']['type']}: {ex.body['error']['message']}") f"{ex.body['error']['type']}: {ex.body['error']['message']}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment