Skip to main content

Errors and security

Handle failures explicitly and treat personal access tokens as credentials.

Error responses​

Non-streaming request failures return JSON with an error string:

{ "error": "Invalid, expired, or revoked access token" }
StatusMeaningWhat to do
400Invalid request body, query, path, or ID, or an attachment over the size limit or of an unsupported type.Fix the request. Don't retry it unchanged.
401Missing, malformed, expired, revoked, or invalid token.Check the token; create a new one if needed.
403Unverified or inactive account, not a member of the organization, or API access disabled.Fix access or the X-Organization-Id header.
404The resource doesn't exist or you can't access it. The two cases look the same on purpose.Check the ID and the organization.
409A turn start clashed with another turn on the same chat.Wait for the chat to settle, then check it before resubmitting.
429The caller is rate limited.Back off, honoring Retry-After when present.

Some chat engine failures use a different error body or plain text, so check the HTTP status before parsing a response as success. Turning API access off returns 403 even for tokens issued earlier. It doesn't revoke them or cancel accepted chat work, but status and message reads stay blocked until access is turned back on.

The MCP server reports these failures to the agent with the originating status and message. Network and response-validation problems have no HTTP status, so treat a missing status as a transport failure rather than a rejected request.

Retry guidance​

  • Retry read-only requests after network interruptions and 429 responses with bounded exponential backoff and jitter; honor Retry-After when present.
  • Do not blindly retry a chat POST after a lost response: it may already have started work. There is no idempotency-key contract. Save the chat ID and check status and messages before resubmitting.
  • Do not retry 400, 401, 403, or 404 without changing credentials or request input.
  • A chat stream can be long-lived. If it disconnects, resume it with GET /chats/{chatId}/stream using the chat ID from the original request.
  • Never log raw request authorization headers while diagnosing failures.

Token operations​

  • Use one token per machine, job, or integration.
  • Give tokens recognizable names so the affected integration can be identified during rotation or revocation.
  • Store tokens in an operating-system credential store, deployment secret, or dedicated secret manager.
  • Never commit tokens to a repository or place them in application bundles.
  • Never send a production token to a development, preview, or third-party base URL.
  • Choose the shortest expiry that fits the job. Rotate a token before it expires and revoke the old token after the replacement is live.
  • Revoke a token immediately if it may have been exposed.

Manage tokens in Arca settings, with GET /tokens and DELETE /tokens/{id}, or with the MCP server's arca_list_tokens and arca_revoke_token tools.

The token list contains only metadata and a short prefix. Arca never returns a previously created token secret.

Sharing chats​

A chat link is not a credential: it opens the chat only for someone who signs in and already has access. Access comes from sharing the chat with members of your organization, and is removed from the chat's Share menu in the web app. Revoking a token does not remove access it granted.