{"version":"2.1.274","anchor":"api-error-responses-now-carry-a-machine-readable-apierror","canonical_anchor":"api-error-responses-now-carry-a-machine-readable-apierror","heading":"API errors now carry machine-readable error codes","tier":"internal","area":"API Errors","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274\/e\/api-error-responses-now-carry-a-machine-readable-apierror","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274","markdown":"### API errors now carry machine-readable error codes\n\nAPI error responses now include a typed apiError code (and often apiErrorParams) instead of just a human-readable message\n\n**What**\n\n- Many request\/auth error branches in the API-error formatter now attach a machine-readable `apiError` code (and sometimes `apiErrorParams`) alongside the existing human-readable message. This covers tool-use concurrency conflicts, duplicate or orphaned `tool_use` ids, using an effort setting without thinking enabled, advisor-model incompatibility, disabled API-key auth, and provider credential failures for Bedrock, Vertex, and Foundry (which now include a `remedy` param).\n\n- The catch-all error handler now classifies more failure modes with their own typed `apiError` codes instead of lumping them into a generic error: `no_response`, `tls_untrusted_ca`, `gateway_content_type` (a Bedrock proxy rewriting the event stream), `provider_credentials` (with `apiErrorParams: {provider, remedy: 'host_managed'}`), and `gateway_signin_required`\/`gateway_session_expired` (with `remedy: 'gateway_token'` when the token came from the environment). Previously most of these produced a generic `server_error`\/`unknown` message with no machine-readable cause.\n\n**Why** Typed error codes let tooling and error handling react to the specific cause of an API failure instead of just showing a generic message, making it easier to tell the user what went wrong and how to fix it.\n\n- Area: API Errors\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}