> ## 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 Send Error • AI Agent SDK

> classify_send_error: Pure, dependency-free fallback classifier for a send exception.

# classify\_send\_error

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**base**](../modules/base) module.

Pure, dependency-free fallback classifier for a send exception.

Maps an exception into a :class:`SendResult` carrying a
:class:`SendErrorKind` and derived `retryable` flag, keying primarily off
the HTTP/platform status code (highest fidelity) and falling back to a
small set of generic, cross-platform substrings. It is deliberately
conservative: anything it cannot confidently classify becomes
`UNKNOWN` (retryable), preserving the historical retry-everything default.

Adapters that know their native exception types should override
:meth:`BasePlatformAdapter.classify_error` for higher fidelity; this
ensures adapters that don't still behave correctly for standard HTTP cases.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def classify_send_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

* `SendResult`

## Used By

* [`BasePlatformAdapter.classify_error`](../functions/BasePlatformAdapter-classify_error)

## Source

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