---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/anthropic_messages/types/type-aliases/AnthropicMessagesErrorStatusResolver.md
description: Recovers an HTTP status the Anthropic SDK could not observe.
---

# Type Alias: AnthropicMessagesErrorStatusResolver

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

Defined in: [src/batteries/llm/anthropic\_messages/types.ts:352](https://github.com/NHTIO/ADK/blob/v1.20261003.0/src/src/batteries/llm/anthropic_messages/types.ts#L352)

Recovers an HTTP status the Anthropic SDK could not observe.

## Parameters

| Parameter | Type                                                                                      | Description                                            |
| --------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `input`   | [`AnthropicMessagesErrorStatusInput`](../interfaces/AnthropicMessagesErrorStatusInput.md) | The 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](../interfaces/AnthropicMessagesAdapterOptions.md#property-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.
