跳转至主要内容

Starknet Error Code Reference

更新于
Aug 28, 2026
Quicknode 为您的 RPC 端点Quicknode 错误日志。您可直接在仪表盘中查看详细的错误信息,从而轻松识别并解决问题。

HTTP 错误代码

Let's look at the common HTTP errors you can encounter, what they mean and what you can do to prevent them.

400请求错误

HTTP 请求类型不正确(例如,使用 GET 而不是 POST)或包含无效字符

401未授权

当一项或多项安全要求未得到满足时,可能会发生这种情况,例如令牌认证错误、IP 地址不在白名单中、JWT 无效等。

403访问被禁止

Endpoint (原因之一可能是逾期未付款)

403访问被禁止 - 未找到自定义跟踪

自定义追踪代码未被列入白名单(请提交工单以完成审批流程)

404未找到

URL 错误或方法错误

413内容过大

请求正文过大

413请求实体过大

eth_getLogs 和 eth_newFilter 仅支持 10,000 个区块的范围。在请求日志和事件时,我们强制执行 10,000 个区块范围的限制。

429请求过多

您的每秒请求数(RPS)超出了套餐允许的范围。请查阅我们的支持文档,了解有关 429 错误的更多信息。

500服务器内部错误

Submit a ticket for the support team to take a look at the errors asap

503服务不可用

Submit a ticket for the support team to take a look at the errors asap

HTTP 错误代码示例

下面的代码片段是一个错误代码429 的示例。

{
"jsonrpc": "2.0",
"error": {
"code": 429,
"message": "The requests per second (RPS) of your requests are higher than your plan allows."
},
"id": 1
}

Starknet RPC Error Codes

When working with Starknet, understanding its API error codes is essential for effective troubleshooting and smooth application operation.

1Failed to receive transactionRPC

Sequencer rejected the transaction during validation. Verify transaction format and required fields

10No trace availableRPC

Trace data not available for the transaction. Verify the transaction hash is correct and exists on the network

20Contract not foundRPC

The specified contract address does not exist on the network

21Invalid message selectorRPC

Function selector does not exist in the contract ABI

22Invalid call dataRPC

Calldata is malformed or contains invalid parameters. Verify parameter types and encoding

24Block not foundRPC

The requested block does not exist. Check block number/hash or wait for sync

26Invalid block hashRPC

Block hash format is invalid. Ensure it's a valid hexadecimal string with correct length

27Invalid transaction indexRPC

Transaction index is out of range for this block

28Class hash not foundRPC

The specified class hash has not been declared on the network

29Transaction hash not foundRPC

No transaction found with the provided hash

31Page size too bigRPC

Page size exceeds the maximum allowed limit.

32No blocksRPC

No blocks available in the specified range

33Invalid continuation tokenRPC

The continuation token is invalid or has expired

34Too many keys in filterRPC

Filter contains more keys than the maximum allowed

40Contract errorRPC

An error occurred during contract execution

41Transaction execution errorRPC

Transaction failed to execute. Check contract logic and resource limits

51Class already declaredRPC

Class already exists on the network. Duplicate declarations are not allowed

52Invalid transaction nonceRPC

Invalid nonce for the account. Use the correct sequential nonce value

53Insufficient max feeRPC

Max fee too low. Increase the fee to cover transaction costs

54Insufficient account balanceRPC

Account balance too low. Ensure sufficient funds to cover the transaction fee

55Validation failureRPC

Account validation failed. Check your signature and account contract logic

56Compilation failedRPC

Contract compilation failed. Fix Cairo code syntax and compilation errors

57Contract class size is too largeRPC

Contract class too large. Reduce the contract size to fit within network limits

58Non accountRPC

Sender is not an account contract. Only account contracts can send transactions

59Duplicate transactionRPC

Transaction already exists in mempool. Avoid submitting duplicate transactions

60Compiled class hash mismatchRPC

The compiled class hash does not match the declared hash

61Unsupported transaction versionRPC

Transaction version not supported. Use a compatible transaction version

62Unsupported contract class versionRPC

Contract class version not supported. Use a compatible Cairo compiler version

63Unexpected errorRPC

Unexpected server error occurred. Submit a ticket if the issue persists

-32007Per-second request limit reachedQuicknode

You have exceeded your plan's per-second request limit. Reduce the number of calls per second or upgrade your plan at https://dashboard.quicknode.com/billing/plan.

-32008Per-minute request limit reachedQuicknode

You have exceeded your plan's per-minute request limit. Reduce the number of calls per minute or upgrade your plan at https://dashboard.quicknode.com/billing/plan.

-32011Method rate limit reachedQuicknode

You have exceeded a method-specific rate limit configured for the endpoint. Reduce calls to the method or adjust the method rate-limit rule.

-32604Unsupported request methodQuicknode

The request method is empty, missing, or unsupported. Provide a supported JSON-RPC method name.

-32611Request rejected by filter settingsQuicknode

The request was rejected by an endpoint security filter, such as a method allowlist or blocklist. Review the endpoint's request filter settings.

Starknet RPC Error Code Example

The code snippet below is an example of Error Code 20.

{
"error": {
"code": 20,
"message": "Contract not found"
},
"id": 1,
"jsonrpc": "2.0"
}

Endpoint

Quicknode 为您的 RPC 端点Quicknode 日志,以帮助您排查问题。您可以在Quicknode 直接查看日志,方法是导航至:


  1. 侧边栏中的端点
  2. 选择您的endpoint
  3. 打开“日志”选项卡

您可以按时间范围、响应类型、方法和网络对日志进行筛选。

记录的内容

Endpoint
发送到您endpoint请求,包括 HTTP 状态、请求方法、RPC 方法或路径以及时间戳。

错误详细信息
如有提供,失败的请求将包含错误详细信息,例如 RPC 错误代码、请求和响应正文,以及相关文档的链接。

日志记录限制

日志的可用性可能会因方法、响应类型、网络和套餐而异。为了保持endpoint 最佳endpoint ,日志记录采用“尽力而为”的原则。在流量高峰期间,为了保持低延迟,部分日志可能会被丢弃。

保留与访问

“构建”和“扩展”套餐包含仪表盘访问权限,并提供标准日志保留服务。 “企业”套餐则提供更长的日志保留期限,以及用于检索日志的程序化 API 访问权限。

如果您遇到其他错误代码,请通过提交工单告知我们。我们非常乐意为您提供帮助。