> ## 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.

# Hello Error • AI Agent SDK

> HelloError: Structured connect-rejection envelope.

# HelloError

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

Structured connect-rejection envelope.

Emitted from *every* connection rejection path — both pre-handshake
transport checks (auth/origin/rate-limit) and handshake negotiation —
so clients can implement deterministic reconnect logic by branching on
`(code, next_step)` instead of string-matching close reasons.

Attributes:
code: Structured, machine-readable error code.
message: Human-readable error message (display only).
next\_step: Machine-readable recovery hint telling the client what to
do next (re-authenticate, re-pair, upgrade, wait then retry, ...).
retry\_after\_seconds: Optional backoff hint (rate limiting / transient
unavailability). Only meaningful with `WAIT_THEN_RETRY`.
next\_action: Deprecated free-text hint, retained for backward
compatibility. Prefer `next_step`.

## Properties

<ResponseField name="code" type="ConnectErrorCode">
  No description available.
</ResponseField>

<ResponseField name="message" type="str">
  No description available.
</ResponseField>

<ResponseField name="next_step" type="Optional[ConnectRecoveryStep]">
  No description available.
</ResponseField>

<ResponseField name="retry_after_seconds" type="Optional[int]">
  No description available.
</ResponseField>

<ResponseField name="next_action" type="Optional[str]">
  No description available.
</ResponseField>

<Accordion title="Internal & Generic Methods">
  * **to\_dict**: Serialize to a `hello_error` wire frame.
</Accordion>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L308">
  `praisonaiagents/gateway/protocols.py` at line 308
</Card>
