Error Codes

Error Format

All API errors return a consistent JSON structure:

{
  "error": {
    "code": "invalid_api_key",
    "message": "The provided API key is invalid or expired",
    "status": 401
  }
}

HTTP Status Codes

CodeMeaning
200Success
201Created (originator registered, bundle submitted)
400Bad Request — invalid parameters
401Unauthorized — invalid or missing API key
403Forbidden — key lacks required tier
404Not Found — tx, bundle, or intent not found
429Too Many Requests — rate limit exceeded
500Internal Server Error
503Service Unavailable

Common Error Codes

CodeDescriptionResolution
invalid_api_keyAPI key is invalid or expiredCheck key and register a new one
rate_limit_exceededToo many requests per secondImplement backoff or upgrade tier
chain_not_supportedChain not availableCheck /healthz for available chains
bundle_revertedBundle simulation revertedCheck calldata and gas limits
intent_expiredIntent deadline passedSubmit a new intent
solver_suspendedSolver has too many penaltiesContact support
insufficient_balanceNot enough ETH for gasFund your wallet
tx_already_knownTransaction already in mempoolUse the existing tx hash

Error Handling Example

async function protectedSend(tx: string) {
  const res = await fetch(
    "https://rpc.yoorquezt.io/v1/rpc/ethereum-sepolia",
    {
      method: "POST",
      headers: {
        "X-API-Key": "yq_test_abc123",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        jsonrpc: "2.0",
        method: "eth_sendRawTransaction",
        params: [tx],
        id: 1,
      }),
    }
  );

  if (!res.ok) {
    const { error } = await res.json();
    switch (error.code) {
      case "rate_limit_exceeded":
        await sleep(1000);
        return protectedSend(tx);
      case "chain_not_supported":
        throw new Error("Chain unavailable");
      default:
        throw new Error(error.message);
    }
  }

  return res.json();
}
Edit this page