Open
Conversation
Expose `error.error.type` (e.g. `"rate_limit_error"`, `"overloaded_error"`) as a top-level `.type` field on `APIError`. This lets users identify error kinds uniformly across HTTP errors and streaming errors, since streaming errors arrive as SSE error events with HTTP 200 status (making `instanceof` and status code checks unreliable). Equivalent of stainless-sdks/anthropic-python#1587 for TypeScript. ```typescript try { for await (const event of stream) { /* ... */ } } catch (err) { if (err instanceof Anthropic.APIError) { if (err.type === 'rate_limit_error' || err.type === 'overloaded_error') { // retry after backoff — works for both streaming and non-streaming } } } ```
fbd3165 to
f0c0b7e
Compare
ceb2e50 to
4b4a3d5
Compare
4b4a3d5 to
729cbe5
Compare
4f2a4e9 to
b9325b9
Compare
Note that we still want to run tests, as these depend on the metadata.
b9325b9 to
fac149d
Compare
0181cb9 to
6b932b4
Compare
6b932b4 to
b746c36
Compare
b2ca11d to
f3a2326
Compare
f3a2326 to
c70a4f1
Compare
c70a4f1 to
9adcd8b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Stainless prepared a new release
sdk: 0.81.0
0.81.0 (2026-03-27)
Full Changelog: sdk-v0.80.0...sdk-v0.81.0
Features
Chores
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions