# open_ai: Classify additional overload errors \(\#63238\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 764780249ecd806ac205db517ad3af12322689a9

Requested commit: 764780249ecd806ac205db517ad3af12322689a9

Commit: 764780249ecd806ac205db517ad3af12322689a9

Tree: 1961a3671a39cc176ecbdcfd71fb82e30fd7559b

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
open_ai: Classify additional overload errors (#63238)

OpenAI can return streamed overload errors with the codes
`server_is_overloaded` and `slow_down`. Zed previously only recognized
`overloaded_error`, so these responses fell through to
`ProviderErrorCategory::Other`. Downstream consumers could then treat a
routine provider-capacity failure as an unexpected error.

Classify all three codes as `ProviderErrorCategory::Overloaded`. This
lets existing retry and error-reporting behavior handle them
consistently without matching provider-specific messages outside the
OpenAI response parser.

This matches Codex’s handling. Codex classifies both
[`server_is_overloaded` and `slow_down` in streamed
responses](https://github.com/openai/codex/blob/a26f1806a4f4b8cfec2ea1be129963815a61e58c/codex-rs/codex-api/src/sse/responses.rs#L696-L699),
and performs the [same classification for HTTP 503 response
bodies](https://github.com/openai/codex/blob/a26f1806a4f4b8cfec2ea1be129963815a61e58c/codex-rs/codex-api/src/api_bridge.rs#L63-L74).

Release Notes:

- Improved OpenAI error handling
```

## Parents

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

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