@threadplane/chatTypeAliasv0.3.4

AgentErrorKind

The failure class of an AgentError, used to drive UI and retry logic:

  • connection — offline / DNS / connection refused / fetch failed. Retryable.
  • auth — 401 / 403; credentials or API key are wrong. Not retryable.
  • server — a 5xx (retryable) or a non-auth 4xx like 400/404/429 (not retryable).
  • interrupted — the stream closed mid-response after a run had started. Retryable only when recovery is retry; see AgentRecovery.
  • aborted — the user pressed stop; treated as a graceful idle, not surfaced as an error.
import type { AgentErrorKind } from '@threadplane/chat';

Declaration

export type AgentErrorKind = 'connection' | 'auth' | 'server' | 'interrupted' | 'aborted';