🛠 Velarum Docs V0 — Phase-0 testnet only(per ADR-NC-027),内容陆续填入中。
ReferenceError Codes

Error codes

Every Velarum API failure returns a stable, semantic error.code. Codes are grouped by domain below; each row gives the HTTP status, what it means, a recovery hint, and whether the call was idempotency-safe (i.e. no state was created, so a clean retry is safe). This catalogue mirrors the canonical OpenAPI · DTO · Error-Code Spec §9; the Python SDK raises a typed exception per code (see Python SDK).

“Idempotency-safe = yes” means the request did not create or advance a payment/withdrawal, so retrying with the same Idempotency-Key is safe. n/a marks idempotency-mechanism errors themselves.

Error envelope

{ "success": false, "error": { "code": "PAYMENT_POLICY_VIOLATION", "message": "Daily limit exceeded", "details": {} }, "request_id": "req_123", "timestamp": "2026-06-01T10:00:00Z" }

Authentication & access

CodeHTTPMeaningRecovery hintIdempotency-safe?
AUTH_INVALID_API_KEY401API key missing or invalidCheck x-velarum-api-key; rotate if revokedyes
AUTH_EXPIRED_TOKEN401Bearer / agent token expiredRe-authenticate for a fresh tokenyes
AUTH_FORBIDDEN403Authenticated but not permittedCheck the principal role / scopeyes
RBAC_ROLE_MUTEX_VIOLATION409TreasuryAdmin + SecurityAdmin on one userSplit the two duties across membersyes
AUTHORIZATION_NOT_ACTIVE403Authorization grant not activeActivate or recreate the grantyes
AUTHORIZATION_REVOKED403Authorization grant revokedCreate a new authorizationyes
AUTHORIZATION_EXPIRED403Authorization grant expiredRenew or recreate the grantyes

Agent payments

CodeHTTPMeaningRecovery hintIdempotency-safe?
PAYMENT_POLICY_VIOLATION400Intent breaks a policy ruleAdjust the intent or the policyyes (no state)
PAYMENT_INSUFFICIENT_FUNDS422On-chain balance too lowFund the wallet and retryyes
PAYMENT_SLIPPAGE_EXCEEDED400Quote moved past max_slippageRe-quote and retryyes
PAYMENT_ROUTE_UNAVAILABLE502No viable chain route / chain errorRetry later or pick another chainyes
PAYMENT_IDEMPOTENCY_CONFLICT409Same idempotency key, different bodyReuse original key or a new onen/a
PAYMENT_ABANDON_NOT_ALLOWED409Abandon attempted past intent_createdUse wallet replace-by-fee insteadyes

Automation (HC-NC-5)

CodeHTTPMeaningRecovery hintIdempotency-safe?
HC_NC_5_HITL_REQUIRED403Agent intent exceeded a thresholdConfirm in client; resubmit as humanyes (no state)
AUTOMATION_CONSENT_MISSING403Missing / invalid / expired consentRe-authorize the agent before retryyes
AUTOMATION_POLICY_THRESHOLD_INVALID422A policy threshold missing / invalidFill all four thresholdsyes
IDEMPOTENCY_KEY_MISMATCH400Header & body idempotency_key differMake them byte-equaln/a
ABANDON_RECEIPT_INVALID400Abandon receipt failed validationRe-sign with the required payloadyes
BROADCAST_HINT_REJECTED409tx_hash not found / not yoursVerify the tx and resend the hintyes

Policies & resources

CodeHTTPMeaningRecovery hintIdempotency-safe?
POLICY_NOT_FOUND404Policy id not foundCheck the idyes
POLICY_NOT_ALLOWED403Caller may not use this policyCheck ownership / roleyes
POLICY_INVALID_RULE422Policy rule invalidFix the rule valuesyes
AGENT_NOT_FOUND404Agent id not foundCheck the idyes
PROJECT_NOT_FOUND404Project id not foundCheck the idyes

Subjects

CodeHTTPMeaningRecovery hintIdempotency-safe?
SUBJECT_NOT_ACTIVE409Subject is not in active stateVerify / activate the subject firstyes

Notifications

CodeHTTPMeaningRecovery hintIdempotency-safe?
NOTIFICATION_PREFERENCE_LOCKED422Tried to disable a safety-critical emailCannot disable (HC-NC-5)yes
NOTIFICATION_SUPPRESSED409Recipient suppressed (bounce/complaint)Use a different verified addressyes
NOTIFICATION_NOT_FOUND404Notification not visible / foundCheck id / recipientyes

Platform & webhooks

CodeHTTPMeaningRecovery hintIdempotency-safe?
VALIDATION_ERROR400Request failed schema validationFix the offending fieldyes
RATE_LIMITED429Too many requestsBack off and retryyes
KYB_PROVIDER_ERROR502Third-party KYB provider errorRetry lateryes
AUDIT_EXPORT_FAILED500Export job failedRetry the exportyes
WEBHOOK_SIGNATURE_INVALID401Inbound webhook signature failedCheck signing secret / payloadyes
WEBHOOK_DELIVERY_FAILED500Outbound delivery failed (will retry)None — worker retries w/ backoffn/a
SERVER_INTERNAL_ERROR500Unexpected server errorRetry; contact support with request_idyes

Sovereign withdrawals

CodeHTTPMeaningRecovery hintIdempotency-safe?
WITHDRAWAL_REQUEST_NOT_FOUND404Withdrawal id not foundCheck the idyes
WITHDRAWAL_REQUEST_INVALID_STATE_TRANSITION409Action illegal in current stateRe-read state; act from a legal stateyes
WITHDRAWAL_REQUEST_PASSKEY_REQUIRED401WebAuthn / Passkey assertion requiredProvide a Passkey assertionyes
WITHDRAWAL_REQUEST_PASSKEY_ASSERTION_INVALID401Passkey assertion invalidRe-assert with a valid Passkeyyes
WITHDRAWAL_REQUEST_PASSKEY_REPLAY_DETECTED409Passkey assertion replayedGenerate a fresh assertionyes
WITHDRAWAL_REQUEST_SAME_APPROVER_FORBIDDEN403Initiator == approver (4-eyes)Use a different SecurityAdminyes
WITHDRAWAL_REQUEST_DESTINATION_NOT_ACTIVE409Destination not active on allowlistActivate the allowlist entry firstyes
WITHDRAWAL_REQUEST_DESTINATION_REVOKED409Destination allowlist entry revokedRe-add the destinationyes
WITHDRAWAL_REQUEST_INSUFFICIENT_BALANCE422Source balance too lowFund the source walletyes
SOVEREIGN_ADDRESS_NOT_FOUND404Allowlist address not foundCheck the idyes
SOVEREIGN_ADDRESS_INVALID_STATE_TRANSITION409Allowlist action illegal in stateRe-read state and retryyes
SOVEREIGN_ADDRESS_COOLDOWN_NOT_ELAPSED40924h cooldown not elapsedWait for cooldown to endyes
SOVEREIGN_ADDRESS_SCREENING_FAILED422Address screening hard-blockChoose a different destinationyes
SOVEREIGN_ADDRESS_SAME_APPROVER_FORBIDDEN403Same approver on allowlist 4-eyesUse a different approveryes
RBAC_DENIED_SOVEREIGN_WITHDRAW_INITIATE403Role may not initiate withdrawalUse a TreasuryAdminyes
RBAC_DENIED_SOVEREIGN_WITHDRAW_SECOND_APPROVE403Role may not second-approveUse a SecurityAdminyes
RBAC_DENIED_SOVEREIGN_ADDRESS_WHITELIST_ADD403Role may not add allowlistUse a TreasuryAdminyes
RBAC_DENIED_SOVEREIGN_ADDRESS_WHITELIST_REVOKE403Role may not revoke allowlistUse an authorized roleyes