# Thread Anthropic errors into LanguageModelKnownError \(\#33261\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c610ebfb0302479e8efcbe5896087337d5f705c7)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c610ebfb0302479e8efcbe5896087337d5f705c7

Requested commit: c610ebfb0302479e8efcbe5896087337d5f705c7

Commit: c610ebfb0302479e8efcbe5896087337d5f705c7

Tree: 3021d67b728189bbe8ee1f724d189e5dc07c61a3

Author: Richard Feldman

Committer: GitHub

## Message

```
Thread Anthropic errors into LanguageModelKnownError (#33261)

This PR is in preparation for doing automatic retries for certain
errors, e.g. Overloaded. It doesn't change behavior yet (aside from some
granularity of error messages shown to the user), but rather mostly
changes some error handling to be exhaustive enum matches instead of
`anyhow` downcasts, and leaves some comments for where the behavior
change will be in a future PR.

Release Notes:

- N/A
```

## Parents

- [aabfea4c10b3f65d4b110ba94d40d10b60e7b43d](https://git.cafe/gitcafe/zed/commit/aabfea4c10b3f65d4b110ba94d40d10b60e7b43d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c610ebfb0302479e8efcbe5896087337d5f705c7?format=markdown)
