HALO preserves provider-compatible error envelopes where practical and returns stable machine-readable codes for Authentication and selected payment flows.
#Error shapes
{
"error": {
"message": "Invalid API Key",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}#Status codes
| Status | Meaning | Default action |
|---|---|---|
| 400 | Invalid payload, redirect, scope, model, or contract | Fix the request |
| 401 | Credential or required proof missing | Authenticate; do not blind retry |
| 403 | Invalid credential or blocked resource | Stop and inspect policy |
| 402 | Payment is required | Settle or add balance, then retry |
| 409 | State or rollout conflict | Refresh state and follow the code |
| 429 | Usage or Authentication rate limit | Back off |
| 500 | Unexpected server failure | Retry only if idempotent |
| 503 | Required dependency or capacity unavailable | Back off with jitter |
#Retry policy
- Retry GET requests and explicitly idempotent operations with bounded backoff.
- Do not replay one-time authorization codes, refresh tokens, or payment proofs blindly.
- Streaming requests require application-level handling because a partial response may have already reached the client.
- Respect
Retry-Afterwhen it is present.