Skip to main content

Error Code Reference

Every failed transaction receipt carries a structured error with a stable numeric code, a machine-readable slug, and human-authored remediation hints.

Error Format

When a transaction fails, the receipt includes a structured error object:
{
  "code": 1202,
  "slug": "E1202",
  "category": "validation",
  "what": "PVM execution error: Invalid input",
  "why": "Address argument was not exactly 20 bytes.",
  "fix": "Pass a 20-byte address (bytes or hex).",
  "docs_url": "https://docs.cowboy.inc/errors/E1202",
  "context": {
    "exception_type": "AddressError",
    "traceback": "..."
  }
}
FieldDescription
codeStable numeric identifier (never re-used)
slugHuman-friendly shorthand (E + code)
categoryOne of: validation, runtime, gas, entitlement, token, timer, commit_reveal, runner, internal
whatOne-line description of the error
whyRoot cause (SDK-authored if available, else Python exception message)
fixActionable remediation hint
docs_urlLink to this documentation page
contextAdditional key-value pairs (e.g., traceback, expected, actual)

Code Ranges

The registry contains 66 codes across 8 categories:
RangeCategoryCount
E1000–E1099Transaction pre-checks9
E1100–E1199PVM static validation1
E1200–E1299PVM runtime / host API21
E1300–E1399Entitlements / manifest3
E1400–E1499CIP-20 tokens11
E1500–E1599Timers / deferred / commit-reveal8
E1600–E1699Runner / consensus / job12
E1900–E1999Internal / fallback1

All Error Codes

E1000–E1099: Transaction Pre-checks

Signature, nonce, basefee, and balance checks that run before the actor handler executes.
CodeDescriptionCategory
E1001Invalid transaction signaturevalidation
E1002Nonce mismatchvalidation
E1003Insufficient balance for value transfervalidation
E1004Insufficient balance for gasgas
E1005Out of cyclesgas
E1006Out of cellsgas
E1007Gas calculation overflowgas
E1008Basefee too lowgas
E1009Missing required signervalidation

E1100–E1199: PVM Static Validation

Compile-time determinism checks enforced at actor deploy.
CodeDescriptionCategory
E1101Non-deterministic actor codevalidation

E1200–E1299: PVM Runtime / Host API

Errors during actor execution — host calls, state access, and messaging.
CodeDescriptionCategory
E1201Out of gas inside the PVMgas
E1202Invalid input to host API callvalidation
E1203Host lookup not foundruntime
E1204Backend storage errorruntime
E1205Operation forbiddenruntime
E1206Unclassified PVM-internal failureinternal
E1207Missing entitlemententitlement
E1208Entitlement quota exceededentitlement
E1210Generic PVM execution errorruntime
E1211Caller is not authorizedvalidation
E1212Unsupported instruction/opcodevalidation
E1213Input bytes failed schema validationvalidation
E1214Serialization failureinternal
E1220Target actor does not existruntime
E1221Actor already exists at target addressruntime
E1222Target account does not existruntime
E1223Account already exists at target addressruntime
E1224Referenced message id does not existruntime
E1225Duplicate message idruntime
E1226Target mailbox is fullruntime
E1227Persistent store errorinternal

E1300–E1399: Entitlements / Manifest

Entitlement declaration and grant errors.
CodeDescriptionCategory
E1302Invalid manifestentitlement
E1303Non-system actor declared a system-only entitlemententitlement
E1304Entitlement conflictentitlement

E1400–E1499: CIP-20 Tokens

Fungible token operations — create, transfer, approve, hooks.
CodeDescriptionCategory
E1401Token not foundtoken
E1402Token already existstoken
E1403Insufficient token balancetoken
E1404Insufficient token allowancetoken
E1405Token account is frozentoken
E1406Not authorized for this token operationtoken
E1407Mint would exceed max_supplytoken
E1408Transfer hook rejected the transfertoken
E1409Transfer hook attempted reentrancytoken
E1410Transfer hook execution failedtoken
E1411Transfer hook exceeded gas capgas

E1500–E1599: Timers / Deferred / Commit-Reveal

Scheduled execution and commit-reveal protocol errors.
CodeDescriptionCategory
E1501Timer limit exceeded for actortimer
E1502Invalid deferred transactionvalidation
E1510Commitment mismatchcommit_reveal
E1511Commit window closedcommit_reveal
E1512Reveal window not yet opencommit_reveal
E1513Reveal window closedcommit_reveal
E1514Runner already committed for this jobcommit_reveal
E1515No commitment found for this runnercommit_reveal

E1600–E1699: Runner / Consensus / Job

Off-chain compute runner registration, job dispatch, and verification.
CodeDescriptionCategory
E1601Runner already registeredrunner
E1602Runner not foundrunner
E1603Insufficient stakerunner
E1604Invalid job schemavalidation
E1605Job not foundrunner
E1606Runner not assigned to jobrunner
E1607Insufficient runners availablerunner
E1608No consensus reachedrunner
E1609Threshold not metrunner
E1610Non-deterministic resultsrunner
E1611Unsupported verification moderunner
E1612TEE required for deterministic moderunner

E1900–E1999: Internal / Fallback

Unclassified errors — report with tx hash.
CodeDescriptionCategory
E1900Unclassified error / fallbackinternal

Reading Errors

From the CLI / RPC

curl -s http://localhost:4000/v1/transactions/<TX_HASH>/receipt | jq '.status'

From a Python Actor

import pvm_host

try:
    pvm_host.set_state(b"key", b"value")
except pvm_host.HostError as e:
    if e.name == "missing_entitlement":    # → E1207
        ...
    elif e.name == "entitlement_quota_exceeded":  # → E1208
        ...
    else:
        raise

Raising Structured Errors

Use SDK exception classes for automatic structured error population:
from cowboy_sdk.errors import AddressError, CodecError

def transfer(self, payload):
    if len(target) != 20:
        raise AddressError(f"expected 20 bytes, got {len(target)}")
    # → receipt: code=1202, slug=E1202, category=validation