-
Notifications
You must be signed in to change notification settings - Fork 20
API v3 error codes #1471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
API v3 error codes #1471
Changes from all commits
b9489b2
d78f8d8
ef2db04
be9a635
8ee77d0
93cb5ec
bb70e1b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| --- | ||
| title: "API v3 error codes" | ||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| | Status | Meaning | | ||
| | ------ | ------------------------------ | | ||
| | `401` | Missing required field | | ||
| | `404` | Data not found | | ||
| | `409` | Resource exists but wrong type | | ||
| | `422` | Invalid request parameters | | ||
| | `500` | Server-side failure | | ||
|
|
||
| ## By task | ||
|
|
||
| ### Account & wallet info | ||
|
|
||
| **Endpoints:** `/api/v3/account`, `/api/v3/addressInformation`, `/api/v3/wallet`, `/api/v3/walletInformation`, `/api/v3/accountStates`, `/api/v3/walletStates` | ||
|
|
||
| | Status | Error | Fix | | ||
| | ------ | -------------------------------- | ----------------------------------------------- | | ||
| | `401` | `address of account is required` | Include the `address` parameter | | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [HIGH] Error strings use code font instead of quotation marksThe error message in the "Account & wallet info" table is rendered as a code span ( Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone! |
||
| | `409` | `not a wallet` | Account exists but isn't a wallet contract | | ||
| | `500` | `balance is none` | Indexer couldn't read balance from stored state | | ||
| | `500` | `status is none` | Indexer couldn't resolve account status | | ||
| | `500` | `last_transaction_hash is none` | No last transaction hash in indexed data | | ||
| | `500` | `last_transaction_lt is none` | No last transaction lt in indexed data | | ||
|
|
||
| ### Sending messages | ||
|
|
||
| **Endpoint:** `/api/v3/message` | ||
|
|
||
| | Status | Error | Fix | | ||
| | ------ | ----------------- | -------------------------------------------- | | ||
| | `401` | `boc is required` | Include a serialized BoC in the request body | | ||
|
|
||
| ### Running get methods | ||
|
|
||
| **Endpoint:** `/api/v3/runGetMethod` | ||
|
|
||
| | Status | Error | Fix | | ||
| | ------ | --------------------- | ------------------------------- | | ||
| | `401` | `address is required` | Include target contract address | | ||
| | `401` | `method is required` | Include the get-method name | | ||
|
|
||
| ### Querying blocks & shards | ||
|
|
||
| **Endpoints:** `/api/v3/masterchainBlockShardState`, `/api/v3/masterchainBlockShards` | ||
|
|
||
| | Status | Error | Meaning | | ||
| | ------ | ------------------ | --------------------------------------- | | ||
| | `404` | `blocks not found` | Block or shard doesn't exist in storage | | ||
|
|
||
| ### Transactions & messages | ||
|
|
||
| **Endpoint:** `/api/v3/transactionsByMessage` | ||
|
|
||
| | Status | Error | Fix | | ||
| | ------ | ----------------------------------------------------------------- | --------------------------- | | ||
| | `422` | `at least one of msg_hash, body_hash, opcode should be specified` | Provide at least one filter | | ||
|
|
||
| ### Pending transactions & traces | ||
|
|
||
| **Endpoints:** `/api/v3/pendingTransactions`, `/api/v3/pendingTraces`, `/api/v3/pendingActions` | ||
|
|
||
| | Status | Error | Fix | | ||
| | ------ | --------------------------------------------------- | ------------------------------------------ | | ||
| | `422` | `at least 1 account address required` | Include at least one account address | | ||
| | `422` | `only one of account, trace_id should be specified` | Use only one filter | | ||
| | `422` | `account or ext_msg_hash should be specified` | Filter by account or external message hash | | ||
| | `500` | `emulatedTracesRepository is not initialized` | Server-side issue | | ||
|
|
||
| ### Traces & events | ||
|
|
||
| **Endpoints:** `/api/v3/traces`, `/api/v3/events` | ||
|
|
||
| | Status | Error | Fix | | ||
| | ------ | ---------------------------------------------------------------------- | --------------------------- | | ||
| | `422` | `only one of account, trace_id, tx_hash, msg_hash should be specified` | Use only one primary filter | | ||
|
|
||
| ### Address book & metadata | ||
|
|
||
| **Endpoints:** `/api/v3/addressBook`, `/api/v3/metadata` | ||
|
|
||
| | Status | Error | Fix | | ||
| | ------ | ----------------------------- | ------------------------------------- | | ||
| | `422` | `at least 1 address required` | Include a non-empty list of addresses | | ||
|
|
||
| ### DNS records | ||
|
|
||
| **Endpoint:** `/api/v3/dns/records` | ||
|
|
||
| | Status | Error | Fix | | ||
| | ------ | --------------------------------------------------- | -------------------------------- | | ||
| | `422` | `either wallet address or domain is required` | Provide wallet address or domain | | ||
| | `422` | `provide either wallet address or domain, not both` | Use one filter, not both | | ||
|
|
||
| ### NFT items | ||
|
|
||
| **Endpoint:** `/api/v3/nft/items` | ||
|
|
||
| | Status | Error | Fix | | ||
| | ------ | ------------------------------------------------------------------ | ------------------------------------------------------------- | | ||
| | `422` | `exact one owner_address required for multiple collection_address` | When querying multiple collections, provide exactly one owner | | ||
|
|
||
| ### Jetton wallets | ||
|
|
||
| **Endpoint:** `/api/v3/jetton/wallets` | ||
|
|
||
| | Status | Error | Fix | | ||
| | ------ | -------------------------------------------------------------- | ---------------------------------------------------------------- | | ||
| | `422` | `exact one owner_address required for multiple jetton_address` | When querying multiple jetton masters, provide exactly one owner | | ||
|
|
||
| ### Multisig | ||
|
|
||
| **Endpoints:** `/api/v3/multisig/wallets`, `/api/v3/multisig/orders` | ||
|
|
||
| | Status | Error | Fix | | ||
| | ------ | ----------------------------------------------------------------- | -------------------------------------------- | | ||
| | `422` | `At least one of address or wallet_address should be specified` | Filter by multisig contract or signer wallet | | ||
| | `422` | `At least one of address or multisig_address should be specified` | Filter by order address or parent multisig | | ||
|
|
||
| ### Decoding | ||
|
|
||
| **Endpoint:** `/api/v3/decode` | ||
|
|
||
| | Status | Error | Fix | | ||
| | ------ | --------------------------------------------- | ---------------------------------------------------------------- | | ||
| | `422` | `opcodes list exceeds maximum length of 1000` | Reduce number of opcodes | | ||
| | `422` | `bodies list exceeds maximum length of 1000` | Reduce number of message bodies | | ||
| | `422` | `invalid opcode format at index %d: %s` | Fix the opcode at specified index (must be valid hex or decimal) | | ||
| | `500` | `marker request failed: <details>` | Internal decode service failed | | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[HIGH] Numeric status columns not right-aligned
In the
Overviewtable, theStatuscolumn header and separator (| Status |/| ------ |) do not specify right alignment, so the numeric HTTP status codes in that column render left-aligned. This violates the documented style rule that numeric columns must be right-aligned for readability and consistency (seecontribute/style-guide-extended.mdx). The same pattern is repeated for all otherStatuscolumns on this page, so the misalignment affects every status code table inv3-errors.mdx. The primary location above points to the first occurrence; other instances share the same structural issue.Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the style guide doesn't fit this one. Left aligned error codes look better IMO

