Anthropic Capability minor

Claude SDKs add typed error codes with an exception class per code

Claude API errors in the SDKs now carry the API's error code, message and details, and each error code has its own exception class (a constant in Go), so code can handle one cause without parsing the response body.

What does this mean for me?

  • Engineering leadership

    Cost, risk, timeline, team impact No impact

    Nothing to decide: this is a developer convenience in the SDKs with no cost or timeline attached.

  • Engineer

    What to change, what breaks, what to test Worth knowing

    Upgrade the Claude SDK to get per-code exception classes (constants in Go), then replace any error handling that parses the response body with catches on the specific class. Optional; existing handling keeps working.

  • General consumer

    Using the Claude apps, not the API No impact

    Nothing to do: this is a developer SDK change and does not affect the Claude apps.

The Claude SDKs now expose the API’s error codes. Each API error raised by the SDK carries the error code, message and details from the API, and each error code has its own exception class; in Go, each is a constant. Code that previously parsed the response body to tell one cause of an error from another can catch the specific class instead.

To use error codes, update to the latest version of the SDK. The release notes list the change under November 4, 2026; it was added to the release notes page later, which is why it reaches the timeline now.

The Handle errors page in the Claude Platform docs describes how to use the new classes.

Sources

Confidence
high
Verification
Verified: stated on the vendor's own pages
Date precision
exact
How this entry was made
Drafted by an agent, reviewed by a person