Under the hoodTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
API ErrorsArea: what it touches
ImprovementsKind: in v2.1.274,
ImprovementsSection of the release
What
When the API returns a rate-limit or invalid-request error, Claude Code now attaches a structured apiError code identifying the specific cause, in addition to the existing free-text error message. New codes include:
model_requires_usage_credits
long_context_credits_required
pdf_too_large
pdf_password_protected
Why
Structured error codes let Claude Code (and anything reading these errors) distinguish specific failure causes, such as an oversized or password-protected PDF, rather than relying only on parsing a text message.