Skip to main content
npayload is launching soon.
npayloadDocs
ASP ProtocolSpecification

Error Codes

Rejection code registry, error categories, and recommended recovery actions

ASP defines a structured set of rejection codes and error categories. These codes appear in REJECT message bodies (via the code field) and in INFORM messages with informType: "error". Implementations SHOULD use these codes to enable programmatic error handling and automated recovery.

Rejection Code Registry

CodeCategoryDescriptionRetryableRecommended Recovery
insufficient_trust_scoreTrustSender's trust score is below the recipient's thresholdNoBuild trust through successful sessions over time
unauthorizedAuthSender lacks required permissions or credentialsNoVerify credentials, scopes, and DPoP proof
schema_unsupportedProtocolProposed schema or format is not supported by the recipientNoUse a schema the recipient's Agent Card declares as supported
budget_exceededEconomicProposed terms exceed the recipient's budget or ceilingYesReduce the requested amount or adjust terms
capacity_unavailableResourceRequested resources are not currently availableYesRetry after a delay or adjust resource requirements
policy_violationGovernanceRequest violates the recipient's organizational policyNoReview the recipient's published policies
timeoutTemporalResponse window for the referenced message has expiredYesSend a new proposal with a longer timeout
duplicateProtocolA message with this identifier has already been processedNoUse a new proposalId or commitmentId
escalation_requiredAuthorityRequest requires human approval or higher authorityYesWait for escalation to resolve, then retry
unspecifiedGeneralNo specific machine-readable reason appliesVariesCheck the reason field for a human-readable explanation

The insufficient_trust_score rejection is not immediately retryable, but the underlying condition can improve over time. Trust scores increase through successful sessions, so agents with low scores can eventually meet higher thresholds.

Error Categories

Protocol Errors

Violations of the ASP specification itself. These errors indicate a bug in the sender's implementation.

ErrorDescription
Invalid state transitionPerformative is not valid for the current session state (e.g., COMMIT from IDLE)
Malformed messageRequired fields are missing or have invalid types
Schema violationMessage body does not match the performative's defined schema
Hash chain failureintegrity.hash does not match content, or previousHash is incorrect
Duplicate message IDA message with this messageId has already been processed
Version mismatchversion field does not match a supported protocol version

Trust Errors

Errors related to the trust scoring system.

ErrorDescription
Insufficient trust scoreSender's composite score is below the recipient's minimum threshold
Trust ceiling exceededTransaction value exceeds the maximum allowed for the sender's trust level
Trust not establishedNew agent with no session history (trust score is 0)

Economic Errors

Errors related to budgets, escrow, and financial terms.

ErrorDescription
Budget exceededProposed amount is higher than the recipient's configured budget
Escrow insufficientCommitment requires escrow but the deposited amount is not enough
Transaction ceiling reachedTrust-level-based limit on maximum transaction value has been hit

Temporal Errors

Errors caused by timing issues.

ErrorDescription
Response timeoutmaxResponseTimeMs constraint expired before a response was received
Proposal expiredvalidUntil timestamp has passed
Session timeoutTotal session lifetime has exceeded the configured maximum
Escalation timeoutEscalation did not receive resolution within the timeout period

Auth Errors

Errors related to authentication and authorization.

ErrorDescription
Invalid DPoP proofDPoP JWT is malformed, expired, or does not match the request
UnauthorizedAccess token is missing, expired, or invalid
Scope mismatchAccess token does not include the required scope for this operation

Transport Errors

Errors at the delivery layer, below the protocol level. These are not part of the ASP message format but may be returned by the transport binding.

ErrorDescription
Delivery failureTarget agent's endpoint is unreachable
Instance unavailableTarget instance is down or unreachable
Rate limit exceededToo many messages in the current rate window

Using Error Codes in Messages

REJECT with Error Code

When rejecting a proposal or commitment, include the rejection code in the content.body:

{
  "version": "asp/0.1",
  "messageId": "019526a1-8f2a-7000-8000-000000000005",
  "sessionId": "019526a1-7c3e-7000-8000-000000000001",
  "sequenceNumber": 4,
  "timestamp": "2026-03-07T14:35:00.000Z",
  "sender": {
    "agentId": "agent://cloudprime.io/gpu/beta",
    "orgId": "org_cloudprime",
    "trustScore": 91,
    "dpopProof": "eyJ..."
  },
  "performative": "REJECT",
  "content": {
    "mimeType": "application/asp+json",
    "body": {
      "referenceId": "prop_001",                          // ← ID of the rejected proposal
      "reason": "Requested price is below our minimum",   // ← Human-readable
      "code": "budget_exceeded",                           // ← Machine-readable
      "retryable": true                                    // ← Sender MAY retry with new terms
    }
  },
  "integrity": {
    "hash": "sha256:a1b2c3d4...",
    "previousHash": "sha256:e5f6a7b8...",
    "signature": "ed25519:x1y2z3..."
  }
}

The retryable: true flag tells the sender that a modified proposal with different terms could succeed. Implementations SHOULD respect this flag when deciding whether to retry.

INFORM with Error Type

When reporting an error during execution (not a rejection of a proposal), use INFORM with informType: "error":

{
  "version": "asp/0.1",
  "messageId": "019526a1-9a1b-7000-8000-000000000008",
  "sessionId": "019526a1-7c3e-7000-8000-000000000001",
  "sequenceNumber": 7,
  "timestamp": "2026-03-07T14:40:00.000Z",
  "sender": {
    "agentId": "agent://cloudprime.io/gpu/beta",
    "orgId": "org_cloudprime",
    "trustScore": 91,
    "dpopProof": "eyJ..."
  },
  "performative": "INFORM",
  "content": {
    "mimeType": "application/asp+json",
    "body": {
      "informType": "error",                            // ← Error, not rejection
      "subject": "GPU provisioning failed",
      "data": {
        "error": "Resource provisioning timed out",
        "commitmentId": "cmt_001",                      // ← Which commitment is affected
        "retryable": true,                               // ← Can be retried
        "suggestedAction": "Retry in 5 minutes"
      }
    }
  },
  "integrity": {
    "hash": "sha256:b2c3d4e5...",
    "previousHash": "sha256:f6a7b8c9...",
    "signature": "ed25519:z3a4b5..."
  }
}

An INFORM error during the EXECUTING state does not automatically end the session. The parties MAY negotiate a resolution, retry, or ESCALATE. Only an explicit CLOSE or a timeout transitions the session to a terminal state.

Handling Unknown Codes

If an implementation receives a rejection code it does not recognize:

  1. Treat the error as unspecified
  2. Read the reason field for a human-readable explanation
  3. Check the retryable field to determine if a retry is appropriate
  4. Log the unknown code for monitoring and future reference

Implementations MUST NOT reject a message solely because it contains an unknown rejection code. The registry MAY be extended in future protocol versions.

Error Decision Flow

  Receive error response

       ├── Has "code" field?
       │      │
       │      ├── Yes ──► Look up code in registry
       │      │              │
       │      │              ├── Known code ──► Handle per recovery action
       │      │              │
       │      │              └── Unknown code ──► Treat as "unspecified"
       │      │
       │      └── No ──► Read "reason" field for human-readable explanation

       └── Check "retryable" field

              ├── true ──► Modify request and retry (with backoff)

              ├── false ──► Do not retry. Adjust approach or ESCALATE.

              └── absent ──► Assume not retryable unless context suggests otherwise

Was this page helpful?

On this page