Are you an LLM? You can read better optimized documentation at /api/@nhtio/adk/batteries/llm/anthropic_messages/error_translation/functions/anthropicErrorHeaders.md for this page in Markdown format
Function: anthropicErrorHeaders()
ts
function anthropicErrorHeaders(err: unknown): Headers | undefined;Defined in: src/batteries/llm/anthropic_messages/error_translation.ts:82
The response headers of a real SDK HTTP error, or undefined for anything else.
Parameters
| Parameter | Type | Description |
|---|---|---|
err | unknown | The thrown value. |
Returns
Headers | undefined
The error's Headers, or undefined when it is not an SDK HTTP error.
Remarks
The Retry-After header is read on the retry path (adapter.ts and count_tokens.ts), and BOTH sites previously guarded with isInstanceOf(err, 'APIError', APIError) against the inlined copy — so issue #46 silently disabled Retry-After honouring as well as retry classification. Exporting the structural check here keeps ONE identity-free definition of "is this an SDK HTTP error" and lets those callers stop importing @anthropic-ai/sdk/core/error (which is what inlined the second class identity in the first place).