Skip to content

Errors reference

Every error the SDK raises is an AssayError with a stable code. Branch on the class or the code, never on the message. A server code that your SDK release does not know still arrives, as the nearest class or as AssayError itself.

Node / Python Meaning
code / code The stable code.
retryable / retryable Whether the same call can succeed later.
status / status The HTTP status, when there was one.
fixUrl / fix_url A page that fixes the cause, when the server named one.
details / details Extra data the server sent. Never a key or a signature.
idempotencyKey / idempotency_key On an error from tools.call: the call’s key. Call again with it to retry safely.
Class Code When
ConfigError CONFIG_INVALID Local setup is wrong: no API key, a bad URL or option. Fix the code; never retry.
AuthError AUTH_*, or HTTP 401 The API key is missing, invalid, expired or revoked.
ScopeMissingError (an AuthError) AUTH_SCOPE_MISSING The key lacks a permission. requiredScope (required_scope) names it.
HumanSessionRequiredError (an AuthError) AUTH_HUMAN_SESSION_REQUIRED Only a person signed in to the web app can do this, never an API key.
McpUrlNotFoundError MCP_URL_NOT_FOUND, or HTTP 404 from the MCP host The MCP host serves no such URL to this key: an unknown path or version, or a tool set that is not shared with you. Not retryable. See Choose a URL.
DelegateAlreadyBoundError ACCOUNT_DELEGATE_ALREADY_BOUND The payment key is bound, or waiting, on another live API key.
DelegateBindConflictError ACCOUNT_DELEGATE_BIND_CONFLICT Another key won a first bind at the same moment. Retryable once.
PaymentError PAYMENT_* A payment refusal from the server.
PaymentRequiredError PAYMENT_REQUIRED The tool is paid and the client has no signer. requirement holds what the server asked for.
PaymentSchemeUnsupportedError PAYMENT_SCHEME_UNSUPPORTED No signer for the payment’s network. network names it.
PaymentUnsettledLimitError PAYMENT_UNSETTLED_LIMIT Earlier payments are still being recorded on chain. Nothing was charged. Retryable after retryAfterMs (retry_after).
PaymentRefusedError A guard code, or PAYMENT_REFUSED_BY_CALLER The SDK refused before signing. guard names the check (G1 to G12, or onPayment). Nothing was signed.
PaymentNetworkUnknownError (a PaymentRefusedError) G2_NETWORK The network is not in the client’s network table. network names it.
RateLimitError RATE_LIMITED, TOO_MANY_REQUESTS, MCP_QUOTA_EXCEEDED, MCP_VELOCITY_LIMIT_EXCEEDED, or HTTP 429 Too many requests or calls. Wait retryAfterMs (Node, milliseconds) or retry_after (Python, seconds).
NetworkError NETWORK_ERROR No answer: the connection failed. Retryable.
TimeoutError (a NetworkError) TIMEOUT An attempt passed timeoutMs (timeout). Retryable.
ServerError HTTP 5xx, or an answer the SDK cannot read Retryable for 5xx.

In Python, the classes are in goassay.errors and also importable from goassay.

Code Meaning Fix
AUTH_SCOPE_MISSING, requiredScope: "tools:call" The key cannot call tools (for example a Read only key). Use a key with Call tools.
AUTH_SCOPE_MISSING, requiredScope: "payments" The key cannot pay (a Free calls only key) and called a paid tool, or tried to bind a payment key. Nothing was signed or sent again. Create a key with the Agent choice.
AUTH_SCOPE_MISSING, requiredScope: "activity:read" The key cannot read receipts. Use a key with Read activity.
AUTH_HUMAN_SESSION_REQUIRED The route changes the controls over the agent (limits, keys, alerts). A person does it in the web app.

A missing permission is not retryable: only a new key with that permission fixes it. A person chooses the permissions when creating the key; see Configure the client.

A PaymentRefusedError means one of the SDK’s checks failed. Its code names the exact reason.

Guard Codes What failed Fix
G1 G1_NOT_A_REQUIREMENT, G1_RAIL, G1_SCHEME, G1_NOT_FORWARDED, G1_FORWARD_TOO_OLD The payment request is not a voucher request for a call this client just sent. Call again. Report it if it repeats.
G2 G2_NETWORK, G2_PAY_TO, G2_ASSET, G2_DECIMALS, G2_AMOUNT The network, escrow, asset or decimals differ from the client’s table, or the amount is not valid. Do not work around it. Update the SDK, or check networks.
G3 G3_NO_QUOTE, G3_QUOTE_ASSET, G3_ABOVE_QUOTE No price quote for the tool, or the amount is above it. Read the tool’s price again with tools.get.
G4 G4_NOT_DELEGATED, G4_OTHER_KEY, G4_INACTIVE, G4_EXPIRED, G4_PAYER_CHANGED, G4_PAYER_INVALID, G4_NO_CHAIN_READ, G4_STALE_READ The chain does not show an active, unexpired permission for this key from this payer, or could not be read. Approve the key (see Turn on paid calls from a server), or retry once the chain can be read.
G5 G5_NO_DELEGATE_SIGNER, G5_DELEGATE_MISMATCH, G5_LOCAL_KEY_INVALID, G5_LOCAL_KEY_IS_PAYER The request does not name this client’s key as the signer, or the key is the payer itself. Bind this key, or use a separate payment key.
G6 G6_DELEGATE_CAP, G6_ESCROW_CAP, G6_CAPS_UNREADABLE The amount is above the key’s or the account’s on-chain cap. Choose a cheaper call, or have a person raise the caps.
G7 G7_PER_CALL, G7_PER_DAY, G7_CONFIRMATION_REQUIRED, G7_CONFIRMATION_MISMATCH, G7_LIMITS_UNREADABLE, G7_STATE_UNREADABLE The amount passes the local limits. Choose a cheaper call, wait for the 24-hour window, or raise limits.
G8 G8_PROVIDER_NOT_ALLOWED, G8_PROVIDER_INVALID, G8_PROVIDERS_UNREADABLE The provider is not on the local allow-list. Check your allow-list.
G9 G9_SEQ The sequence number is out of range. Call again. Report it if it repeats.
G10 G10_REQUEST_HASH, G10_RESOURCE, G10_MAX_TIMEOUT A request field has a bad format or range. Call again. Report it if it repeats.
G11 None The SDK does not run this check: it keeps no list of URLs that may pay. Only the local assay-mcp app does. To keep a client free-only, see Choose a URL.
G12 G12_OTHER_TOOL, G12_NOT_A_TOOL_CALL, G12_DEBT_OR_SEQ_ENDPOINT The payment is for another tool or not for a tool call. Do not sign. Report it.
onPayment PAYMENT_REFUSED_BY_CALLER Your hook returned false. Your own rule refused it.
Code Meaning Retry
PAYMENT_REQUIRED The tool is paid. The SDK signs and resends when it has a signer. With a signer
PAYMENT_DEBT_OUTSTANDING The paying account owes for an earlier call. For a channel payment the SDK first renews it itself; the message says what happens next (see Owed payments). A per-call debt is settled by a person in the web app. When the message says so
PAYMENT_INSUFFICIENT_FUNDS The account’s balance cannot cover the call. A person adds funds. No
PAYMENT_VOUCHER_DELEGATE_INACTIVE The key’s permission was stopped or expired. No: approve again
PAYMENT_VOUCHER_EXPIRED The voucher window passed before the call got through. Call again with the same idempotency key
PAYMENT_VOUCHER_SEQ_STALE A parallel call took the sequence number. Nothing charged. Yes
PAYMENT_VOUCHER_ADMISSION_PAUSED A cap change is landing. Nothing charged. Yes, after retryAfter
MCP_IDEMPOTENCY_KEY_INVALID The key is not 1 to 128 printable ASCII characters. No
IDEMPOTENCY_KEY_REUSED The key was used for another tool or other arguments. Nothing charged. No: use a new key
IDEMPOTENCY_IN_PROGRESS The first attempt is still running. The SDK waits and resends. Yes, after retryAfter
IDEMPOTENCY_RESULT_UNAVAILABLE, IDEMPOTENCY_ATTEMPT_STALLED The stored result is gone. Nothing is charged twice. No: check the call in Activity → Calls
MCP_QUOTA_EXCEEDED The free calls for today are used up. Later
MCP_VELOCITY_LIMIT_EXCEEDED Too many calls in a short window. Later
RATE_LIMITED The request rate limit. Carries retryAfterMs. After retryAfterMs
MCP_URL_NOT_FOUND The MCP host serves no such URL to this key. It arrives as HTTP 404 with a REST error body, raised as McpUrlNotFoundError. No: fix the URL
ACCOUNT_DELEGATE_ALREADY_BOUND The payment key is bound to another live API key. No
ACCOUNT_DELEGATE_BIND_CONFLICT Another key won a first bind at the same moment. Nothing bound. Once: bind again, the key then waits for approval

These come with channel payments. None of them charges anything.

Code Meaning Retry
PAYMENT_UNSETTLED_LIMIT HTTP 429, raised as PaymentUnsettledLimitError. The account has the money, but earlier payments are still waiting to settle on chain and the call would pass what is available. Not a lack of funds. Nothing charged. retryAfter is the next settlement round. The SDK resends a wait of up to 60 seconds itself. Yes, after retryAfterMs, with the same idempotency key
CHANNEL_ROTATE HTTP 409. A channel payment lane can no longer be used (reason: DISPUTE_KEPT, NO_BUCKET or CALLS_LIMIT), for example because both of its hold buckets are kept for a report. Nothing charged. The SDK and assay-mcp retire the lane and return a retryable error; they sign nothing more in that call. The next call opens a new lane (a new channelId). Five rotations within an hour stop channel offers for an hour. Yes: the next call, on a new lane
CHANNEL_LIMIT HTTP 429. The payer already has its maximum number of open channels (maxOpenChannels). Nothing charged; the voucher was not stored. The SDK and assay-mcp keep the lane, return a retryable error and pay per call for an hour. Yes, after retryAfter
CHANNEL_DESYNC HTTP 409. The lane’s voucher does not follow what was stored for it (a gap, a rewind or another session on the same lane). The server never names the expected values. Nothing charged. The lane is dead: the clients retire it. Yes, on a new lane
CHANNEL_SIGNER_EXPIRING HTTP 403. The payment key’s grant ends too soon (validUntil) for a channel charge to settle in time. Nothing charged. The clients keep the lane and pay per call for an hour. Re-grant the key to pay by channel again
CHANNEL_NOT_OFFERED HTTP 400. A channel voucher was sent where no channel is offered (reason: channels off for the chain, or the collection hold above 3,600 seconds), or a per-call route was used for a channel debt that cannot be settled per call yet. Nothing charged. The clients keep the lane and pay per call for an hour. Pay per call

The SDK raises CHANNEL_ROTATE, CHANNEL_LIMIT, CHANNEL_SIGNER_EXPIRING and CHANNEL_NOT_OFFERED as a retryable PaymentError with that code. It signs nothing more within the refused call, so your next call is the retry.

When a paid call is refused with PAYMENT_DEBT_OUTSTANDING, the SDK renews the channel debts its own key signed (see Channel debts), then raises a PaymentError (PAYMENT_DEBT_OUTSTANDING) with one of these messages. The call was not sent again.

Message Retryable What to do
“Assay is collecting an earlier payment your agent already signed. Paid calls usually resume within about 5 minutes. This call was not charged.” Yes Call again in a few minutes.
“Assay is collecting an earlier payment. Paid calls usually resume within about 5 minutes. This call was not charged.” Yes A person already settled it in the web app. Call again in a few minutes.
“Assay could not collect an earlier payment your agent signed yet. Call again in a minute or two. This call was not charged.” Yes Call again in a minute or two.
“Your agent no longer has the payment record for an earlier channel payment. Settle it in the Assay app at https://portal.goassay.ai/funding once it is offered there.” No A person settles it on Money → Funding when the app offers it, about 2 hours after the lane’s last signature expired.
“Another wallet in your organization owes an earlier payment. Paid calls resume once it is settled by that wallet’s agent or in the Assay app. This call was not charged.” No That wallet’s agent, or a person in the web app, settles it.
The server’s own message No A per-call debt: a person settles it on Money → Funding.

Tool and access codes such as TOOL_NOT_ALLOWED or NO_PROVIDER_MATCHES_RULES are listed in MCP tools.

Code Class Meaning
SIGNER_FAILED PaymentError Your signer threw, or did not return a 65-byte signature. Nothing was sent.
TOOL_ERROR AssayError tools.search or tools.get failed without a readable answer.
WAIT_TIMEOUT AssayError (retryable) waitUntilActive ran out of time before a person approved.
ABORTED AssayError waitUntilActive was stopped with its signal (Node).
IDEMPOTENCY_KEY_REUSED AssayError The same key is in use for another running call in this client.

You have reached the end of Build with the SDK. Return to Developer docs to choose another topic.