Skip to main content
Treat every non-2xx Agent API response and transport failure as an unsuccessful operation. The OpenAPI document describes successful 200 responses but does not define a universal error object, complete status-code set, or operation-specific retry rules.
Do not implement against the older example containing error.code, error.message, and requestId. That shape has not been established as a common error format across Neuron deployments.

Minimum client behavior

  1. Record the operation, Neuron host, HTTP status when available, and a local correlation identifier.
  2. Keep credentials, JWTs, personal data, contract attachments, and unreviewed upstream bodies out of browser responses and ordinary logs.
  3. Preserve the raw status and body only in a protected server-side diagnostic path when policy permits it.
  4. Parse a structured error only when the specific deployment or operation documents its schema.
  5. Present a stable application-owned error to an untrusted client.
Translate upstream failures into an application response your interface can handle. Preserve useful diagnostics in protected backend logs, and show the user the next action without exposing the raw upstream body.

Retry decision

Do not infer safety from the HTTP method: most current Agent API operations use POST, including both reads and state-changing commands.
  • Retry a read only when the application can tolerate repetition and the deployment’s failure contract identifies the condition as transient.
  • Do not automatically retry signing, messaging, account creation, contract mutation, token mutation, or value-moving operations without a verified idempotency or reconciliation mechanism.
  • If the deployment returns a retry delay, honor the deployment’s documented semantics; a common Retry-After behavior is not currently specified for all Neuron deployments.
  • Bound attempts, add jitter, and surface a terminal failure rather than creating an infinite authentication or command loop.
See Idempotency and replay and Rate limits for the behavior to confirm with your provider.