Skip to main content

SendErrorKind

Defined in the base module.
AI Agent Structured, machine-readable classification of why a send failed. Carried on :class:SendResult so the retry loop, delivery router, dead-target registry, DLQ and user-notice path can all reason about a failure uniformly instead of substring-matching an English error string. Members: RATE_LIMITED: Throttled by the platform (HTTP 429); retry after wait. TARGET_NOT_FOUND: Chat/channel no longer exists (HTTP 404/410); the whole target is permanently unreachable — do not retry, mark dead. FORBIDDEN: Bot was kicked/blocked or lacks rights (HTTP 403); the target is permanently unreachable — do not retry, mark dead. AUTH_FATAL: Bad/expired/revoked credential (HTTP 401); retrying the same token is pointless — surface as a degraded state. INVALID_REQUEST: Malformed payload the platform rejects (HTTP 400); retrying the identical request will fail again. TRANSIENT: Network blip / 5xx / timeout; safe to retry with backoff. UNKNOWN: Could not classify; treated as retryable to preserve the historical default (do not silently drop a send we can’t classify).

Source

View on GitHub

praisonaiagents/bots/base.py at line 69