> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Classify Error • AI Agent SDK

> classify_error: Map a native send exception into a classified :class:`SendResult`.

# classify\_error

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**BasePlatformAdapter**](../classes/BasePlatformAdapter) class in the [**base**](../modules/base) module.

Map a native send exception into a classified :class:`SendResult`.

This is the seam adapters override to translate their platform SDK's
exception types and status codes into the shared
:class:`SendErrorKind` taxonomy with full fidelity — done once at the
boundary where that information is available, rather than
reverse-engineered from a string later in the delivery loop.

The default delegates to the pure, status/text-aware
:func:`classify_send_error`, so an adapter that does not override still
behaves correctly for standard HTTP cases and only *provably permanent*
failures short-circuit the retry loop.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def classify_error(exc: BaseException) -> SendResult
```

## Parameters

<ParamField query="exc" type="BaseException" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="SendResult">
  The result of the operation.
</ResponseField>

## Uses

* `classify_send_error`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/bots/base.py#L533">
  `praisonaiagents/bots/base.py` at line 533
</Card>
