Classify Error • AI Agent SDK
classify_error: Map a native send exception into a classified :class:`SendResult`.
classify_error
Method
</div>
This is a method of the BasePlatformAdapter class in the 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
def classify_error(exc: BaseException) -> SendResultParameters
BaseExceptionNo description available.
Returns
SendResultThe result of the operation.
Uses
classify_send_error
Source
View on GitHubpraisonaiagents/bots/base.py at line 811