NaiveError on a non-2xx response:
Common codes
| Code | Meaning |
|---|---|
not_found | Resource (or cross-tenant user) not in your workspace |
forbidden | Blocked by the user’s AccountKit (e.g. toolkit_not_allowed, tool_not_allowed, primitive_disabled_by_kit) |
feature_not_configured | Connections provider or Vault KMS not configured on the API |
invalid_input | Bad request body / params |
provider_error | Upstream provider (connections/KMS) failure |
Pending approval is not an error
A sensitive call gated by the user’s AccountKit returns HTTP 202 with{ status: "pending_approval", approval_id }. This is a success-with-deferral
— it does not throw. The gated methods (cards.create, domains.purchase,
verification.start, formation.submit, connections.connect, …) resolve to
either their normal result or a PendingApproval. Discriminate with the typed
helper: