Skip to content

Commit

Permalink
Handle overload errors in Anthropic.
Browse files Browse the repository at this point in the history
  • Loading branch information
Emery Berger committed Mar 28, 2024
1 parent 23e2b8b commit 04a2e3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coverup/coverup.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ async def do_chat(seg: CodeSegment, completion: dict) -> str:

return await litellm.acreate(**completion)

except (openai.RateLimitError, openai.APITimeoutError) as e:
except (openai.RateLimitError, openai.APITimeoutError, litellm.APIError) as e:

# This message usually indicates out of money in account
if 'You exceeded your current quota' in str(e):
Expand Down

0 comments on commit 04a2e3f

Please sign in to comment.