{"version":"2.1.274","anchor":"new-structured-apierror-codes-attached-to-rate-limitforma","canonical_anchor":"new-structured-apierror-codes-attached-to-rate-limitforma","heading":"New structured apiError codes attached to rate-limit\/format error responses","tier":"internal","area":"API Errors","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274\/e\/new-structured-apierror-codes-attached-to-rate-limitforma","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274","markdown":"### New structured `apiError` codes attached to rate-limit\/format error responses\n\nAPI error responses now carry structured error codes like pdf_too_large alongside plain-text messages\n\n**What**\n\nWhen 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:\n\n- `model_requires_usage_credits`\n\n- `long_context_credits_required`\n\n- `pdf_too_large`\n\n- `pdf_password_protected`\n\n**Why**\n\nStructured 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.\n\n- Area: API Errors\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}