401 Unauthorized: Invalid runtime key
Cause: TheAuthorization header is missing, malformed, or contains an invalid runtime key.
Solution:
- Verify the
MANDATE_RUNTIME_KEYenvironment variable is set. - Check the key prefix:
mndt_test_*for testnet,mndt_live_*for mainnet. - Confirm the key has not been regenerated from the dashboard.
~/.mandate/credentials.json with the new key.
403 Circuit breaker active
Cause: The agent’s circuit breaker is tripped. This happens when the envelope verifier detects an on-chain transaction that does not match the validated parameters, or when the owner manually stops the agent. Solution:- Open the dashboard and check the circuit breaker status for the agent.
- Review the audit log to determine what triggered the trip.
- If auto-tripped: an envelope mismatch is a security event. Investigate before resetting.
- Reset the circuit breaker in the dashboard when you are confident the issue is resolved.
422 per_tx_limit_exceeded
Cause: The transaction amount exceeds the per-transaction USD limit configured in the policy. Default: $100. Solution: Reduce the transaction amount, or ask the owner to increasespend_limit_per_tx_usd in the Policy Builder.
422 address_not_allowed
Cause: The destination address is not in the policy’sallowed_addresses or allowed_contracts list. When an allowlist is configured, only listed addresses pass.
Solution: Add the address in the Policy Builder, or set allowed_addresses to null to allow all addresses.
422 reason_blocked
Cause: Thereason field triggered prompt injection detection. Mandate scans for 18 attack patterns including direct injection (“ignore all instructions”), jailbreak personas, base64 evasion, and authority escalation.
Solution: Review the reason text. Remove manipulation language and write a clear, factual description of the transaction purpose.
422 intent_hash_mismatch
Cause: TheintentHash submitted in a raw validation request does not match the server’s recomputation. This is the most common issue with raw validation.
Solution: See Intent Hash Mismatch for the full debugging checklist. Common fixes:
- Use the latest nonce (not a cached value).
- Lowercase all addresses and calldata.
- Set
accessListto[], notundefined. - Use the SDK’s
computeIntentHash()function to avoid manual computation errors.
202 Approval required
Cause: The transaction passed all policy checks but triggered one or more approval rules. The intent is now inapproval_pending state, waiting for the owner.
Solution: Poll for the owner’s decision using waitForApproval():
Network error: API unreachable
Cause: The Mandate API is not responding due to a network issue or service disruption. Solution: Block the transaction. Never fall back to calling the wallet directly.Next Steps
SDK Error Classes
Typed error classes for precise error handling.
Block Reasons
All blockReason values with causes and resolutions.
Handle Errors Guide
Production patterns for error handling in agent code.