跳至主要內容

Starknet Error Code Reference

更新於
2026年4月15日
Quicknode 為您的 RPC 端點提供錯誤日誌。您可直接從儀表板查看詳細的錯誤資訊,輕鬆識別並解決問題。

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存取遭拒

終端裝置已停用(其中一個原因可能是款項逾期未付)

403禁止存取 - 未找到自訂追蹤

自訂追蹤代碼未列入白名單(請提交服務單以進行審核流程)

404未找到

網址不正確或方法不正確

413內容過大

請求正文過大

413請求實體過大

eth_getLogs 和 eth_newFilter 的範圍上限為 10,000 個區塊。在請求日誌和事件時,我們會強制執行 10,000 個區塊範圍的限制。

429請求過多

您的每秒請求數 (RPS) 已超過方案所允許的上限。請參閱我們的支援文件,進一步了解 429 錯誤。

500內部伺服器錯誤

請提交一則服務單,以便支援團隊盡快查看這些錯誤

503服務無法使用

請提交一則服務單,以便支援團隊盡快查看這些錯誤

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 transaction

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

10No trace available

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

20Contract not found

The specified contract address does not exist on the network

21Invalid message selector

Function selector does not exist in the contract ABI

22Invalid call data

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

24Block not found

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

26Invalid block hash

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

27Invalid transaction index

Transaction index is out of range for this block

28Class hash not found

The specified class hash has not been declared on the network

29Transaction hash not found

No transaction found with the provided hash

31Page size too big

Page size exceeds the maximum allowed limit.

32No blocks

No blocks available in the specified range

33Invalid continuation token

The continuation token is invalid or has expired

34Too many keys in filter

Filter contains more keys than the maximum allowed

40Contract error

An error occurred during contract execution

41Transaction execution error

Transaction failed to execute. Check contract logic and resource limits

51Class already declared

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

52Invalid transaction nonce

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

53Insufficient max fee

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

54Insufficient account balance

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

55Validation failure

Account validation failed. Check your signature and account contract logic

56Compilation failed

Contract compilation failed. Fix Cairo code syntax and compilation errors

57Contract class size is too large

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

58Non account

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

59Duplicate transaction

Transaction already exists in mempool. Avoid submitting duplicate transactions

60Compiled class hash mismatch

The compiled class hash does not match the declared hash

61Unsupported transaction version

Transaction version not supported. Use a compatible transaction version

62Unsupported contract class version

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

63Unexpected error

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

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"
}

端點日誌

Quicknode 會為您的 RPC 端點提供日誌,以協助您診斷問題。您可透過導航至以下位置,直接在Quicknode 儀表板中查看日誌:


  1. 側邊欄中的終點
  2. 選擇您的終端點
  3. 開啟「日誌」分頁

您可以根據時間區間、回應類型、方法及網路來篩選日誌。

哪些內容會被記錄

端點請求
發送至您端點的請求,包括 HTTP 狀態碼、請求方法、RPC 方法或路徑,以及時間戳記。

錯誤詳細資訊
若有提供,失敗的請求將包含錯誤詳細資訊,例如 RPC 錯誤代碼、請求與回應正文,以及相關文件連結。

記錄限制

日誌的可用性可能因方法、回應類型、網路及方案而異。為維持最佳的端點效能,日誌記錄功能採「盡力而為」原則運作。在流量高峰期間,為維持低延遲,部分日誌可能會被捨棄。

保存與存取

「建置」與「擴展」方案包含儀表板存取權限,並提供標準的日誌保留期限。 「企業」方案則提供更長的保留期限,以及透過程式化 API 存取日誌的功能。

如果您遇到其他錯誤代碼,請透過提交服務單告知我們。我們非常樂意為您提供協助

分享這份文件