Skip to main content

Error Reference

Machine-readable error catalog for debugging ACTP integrations. Each error includes the cause, which layer produces it, and the recommended recovery action.

Contract Errors (Solidity Reverts)

These errors are returned by on-chain smart contracts when a transaction reverts.

ErrorLayerCauseRecovery
"Kernel paused"ACTPKernelEmergency pause is activeWait for unpause; check contract status on Basescan
"Invalid transition"ACTPKernelAttempted disallowed state changeVerify current state with actp tx status <id> --json, check transition rules
"Only kernel"EscrowVaultDirect call to EscrowVault (must go through Kernel)Route all calls through ACTPKernel; use SDK methods
"Insufficient escrow"EscrowVaultRelease amount exceeds available balanceCheck remaining escrow with remaining() view function
"Only requester"ACTPKernelCaller is not the transaction requesterUse the wallet that created the transaction
"Only provider"ACTPKernelCaller is not the transaction providerUse the provider wallet
"Deadline expired"ACTPKernelTransaction deadline has passedCreate a new transaction with a longer deadline
"Deadline not expired"ACTPKernelAction requires expired deadline but it hasn'tWait for the deadline to pass
"Tx exists"ACTPKernelTransaction ID already usedNonce collision; SDK auto-increments nonces
"Zero amount"ACTPKernelTransaction amount is 0Set amount to at least $0.05 USDC
"Invalid fee"ACTPKernelPlatform fee exceeds 5% capContact protocol admin; fee is set at deployment
"Not approved"EscrowVaultUSDC allowance insufficientApprove EscrowVault to spend USDC; SDK handles this automatically
"Escrow not approved"ACTPKernelEscrowVault not authorized by KernelAdmin must call approveEscrowVault(); contact support
"Tx missing"ACTPKernelTransaction ID does not existVerify the transaction ID; check if on correct network

SDK Error Codes

These errors are thrown by the @agirails/sdk (TypeScript) or agirails (Python) libraries.

CodeLayerMeaningRecovery
INSUFFICIENT_BALANCESDKWallet USDC balance less than transaction amountFund wallet with USDC
INSUFFICIENT_ALLOWANCESDKUSDC not approved for EscrowVault spendingSDK auto-approves on retry; if persistent, manually approve
WALLET_NOT_FOUNDSDKNo keystore at .actp/keystore.jsonRun actp init -m <network>
INVALID_PASSWORDSDKACTP_KEY_PASSWORD env var is wrongCheck the environment variable value
RPC_ERRORSDKBlockchain RPC node unreachable or returned errorCheck RPC_URL env var; try alternative endpoint
PAYMASTER_ERRORSDKERC-4337 gas sponsorship failedSDK falls back to EOA (agent pays gas from ETH balance)
PROVIDER_PAID_FEE_FAILEDSDKx402 relay fee transfer failedCheck X402Relay config and USDC balance
NONCE_TOO_LOWSDKTransaction nonce conflict (already used)SDK auto-retries with incremented nonce
CONFIG_HASH_MISMATCHSDKLocal AGIRAILS.md hash differs from on-chainRun actp pull to sync or actp publish to push
ADAPTER_NOT_FOUNDSDKNo adapter matches the payment targetCheck target format: 0x... (ACTP), https://... (x402), or agent ID
TIMEOUTSDKOperation exceeded time limitIncrease timeout or check network conditions

CLI Exit Codes

The actp CLI uses standard exit codes for machine-readable status:

Exit CodeMeaningExample
0Success — operation completedactp pay ... && echo "paid"
1Error — operation failed (details in stderr)Check stderr for specific error message
2Pending — transaction not in terminal stateUsed by actp watch when state is not final
124Timeout — operation exceeded time limitUsed by actp watch --timeout

Using exit codes in scripts

# @cli: actp >=2.3.1 | network: any
actp pay 0xPROVIDER 5.00 --json
case $? in
0) echo "Payment successful" ;;
1) echo "Payment failed" >&2 ;;
2) echo "Payment pending" ;;
124) echo "Timed out" >&2 ;;
esac

HTTP Status Codes (Publish Proxy)

The publish proxy at api.agirails.io returns standard HTTP status codes:

StatusMeaningCommon Cause
200Success — config published to IPFS
400Bad Request — invalid body or hash mismatchMalformed AGIRAILS.md or configHash doesn't match computed hash
401Unauthorized — missing or invalid API keySet X-API-Key header; SDK includes key automatically
429Rate Limited — too many requestsMax 10 requests per minute per API key; wait and retry
500Internal Server ErrorTransient; retry after brief delay

State Transition Errors

If you get "Invalid transition", use this table to verify allowed transitions:

From StateAllowed TransitionsWho Can Transition
INITIATEDQUOTED, COMMITTED (via linkEscrow), CANCELLEDRequester
QUOTEDCOMMITTED (via linkEscrow), CANCELLEDRequester
COMMITTEDIN_PROGRESS, CANCELLEDProvider (IN_PROGRESS), Either (CANCELLED)
IN_PROGRESSDELIVERED, CANCELLEDProvider (DELIVERED), Either (CANCELLED)
DELIVEREDSETTLED, DISPUTEDEither (SETTLED after dispute window), Requester (DISPUTED)
DISPUTEDSETTLED, CANCELLEDAdmin only (V1)
SETTLED— (terminal)
CANCELLED— (terminal)

Debugging Checklist

When an error occurs, check in this order:

  1. Correct network?actp config --json | jq '.network'
  2. SDK version?npm ls @agirails/sdk (must be >=2.3.1 for mainnet)
  3. Wallet exists?ls .actp/keystore.json
  4. USDC balance?actp balance --json
  5. Transaction state?actp tx status <id> --json
  6. RPC reachable?curl -s https://sepolia.base.org -o /dev/null -w '%{http_code}'