Skip to content
1 min read · 99 words

Type Alias: AnthropicMessagesErrorStatusResolver ​

ts
type AnthropicMessagesErrorStatusResolver = (
  input: AnthropicMessagesErrorStatusInput,
) => number | undefined;

Defined in: src/batteries/llm/anthropic_messages/types.ts:352

Recovers an HTTP status the Anthropic SDK could not observe.

Parameters ​

ParameterTypeDescription
inputAnthropicMessagesErrorStatusInputThe error, its body text, and the SDK-reported status.

Returns ​

number | undefined

An HTTP status to classify against, or undefined to decline.

Remarks ​

See AnthropicMessagesAdapterOptions.resolveErrorStatus for when this is called, why the ADK ships no default implementation, and the contract for declining. Return an HTTP status (100–599) to classify against, or undefined to leave sdkStatus in force.