Skip to content

Commit

Permalink
docs: added info about new status codes that can be returned by `json…
Browse files Browse the repository at this point in the history
…rpc` (#2195)
  • Loading branch information
frolvanya authored Aug 5, 2024
1 parent 8939d68 commit 2709161
Show file tree
Hide file tree
Showing 8 changed files with 143 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/5.api/rpc/access-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
<code>error.name</code>
</th>
<th>ERROR_CAUSE<br /><code>error.cause.name</code></th>
<th>Status Code</th>
<th>Reason</th>
<th>Solution</th>
</tr>
Expand All @@ -140,6 +141,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
<tr>
<td rowspan="6">HANDLER_ERROR</td>
<td>UNKNOWN_BLOCK</td>
<td>200</td>
<td>The requested block has not been produced yet or it has been garbage-collected (cleaned up to save space on the RPC node)</td>
<td>
<ul>
Expand All @@ -150,6 +152,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
</tr>
<tr>
<td>INVALID_ACCOUNT</td>
<td>200</td>
<td>The requested <code>account_id</code> is invalid</td>
<td>
<ul>
Expand All @@ -159,6 +162,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
</tr>
<tr>
<td>UNKNOWN_ACCOUNT</td>
<td>200</td>
<td>The requested <code>account_id</code> has not been found while viewing since the account has not been created or has been already deleted</td>
<td>
<ul>
Expand All @@ -169,6 +173,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
</tr>
<tr>
<td>UNKNOWN_ACCESS_KEY</td>
<td>200</td>
<td>The requested <code>public_key</code> has not been found while viewing since the public key has not been created or has been already deleted</td>
<td>
<ul>
Expand All @@ -179,6 +184,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
</tr>
<tr>
<td>UNAVAILABLE_SHARD</td>
<td>200</td>
<td>The node was unable to found the requested data because it does not track the shard where data is present</td>
<td>
<ul>
Expand All @@ -188,6 +194,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
</tr>
<tr>
<td>NO_SYNCED_BLOCKS</td>
<td>200</td>
<td>The node is still syncing and the requested block is not in the database yet</td>
<td>
<ul>
Expand All @@ -199,6 +206,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
<tr className="stripe">
<td>REQUEST_VALIDATION_ERROR</td>
<td>PARSE_ERROR</td>
<td>400</td>
<td>Passed arguments can't be parsed by JSON RPC server (missing arguments, wrong format, etc.)</td>
<td>
<ul>
Expand All @@ -210,6 +218,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
<tr>
<td>INTERNAL_ERROR</td>
<td>INTERNAL_ERROR</td>
<td>500</td>
<td>Something went wrong with the node itself or overloaded</td>
<td>
<ul>
Expand Down Expand Up @@ -448,6 +457,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
<code>error.name</code>
</th>
<th>ERROR_CAUSE<br /><code>error.cause.name</code></th>
<th>Status Code</th>
<th>Reason</th>
<th>Solution</th>
</tr>
Expand All @@ -456,6 +466,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
<tr>
<td rowspan="5">HANDLER_ERROR</td>
<td>UNKNOWN_BLOCK</td>
<td>200</td>
<td>The requested block has not been produced yet or it has been garbage-collected (cleaned up to save space on the RPC node)</td>
<td>
<ul>
Expand All @@ -466,6 +477,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
</tr>
<tr>
<td>INVALID_ACCOUNT</td>
<td>200</td>
<td>The requested <code>account_id</code> is invalid</td>
<td>
<ul>
Expand All @@ -475,6 +487,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
</tr>
<tr>
<td>UNKNOWN_ACCOUNT</td>
<td>200</td>
<td>The requested <code>account_id</code> has not been found while viewing since the account has not been created or has been already deleted</td>
<td>
<ul>
Expand All @@ -485,6 +498,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
</tr>
<tr>
<td>UNAVAILABLE_SHARD</td>
<td>200</td>
<td>The node was unable to find the requested data because it does not track the shard where data is present</td>
<td>
<ul>
Expand All @@ -494,6 +508,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
</tr>
<tr>
<td>NO_SYNCED_BLOCKS</td>
<td>200</td>
<td>The node is still syncing and the requested block is not in the database yet</td>
<td>
<ul>
Expand All @@ -505,6 +520,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
<tr className="stripe">
<td>REQUEST_VALIDATION_ERROR</td>
<td>PARSE_ERROR</td>
<td>400</td>
<td>Passed arguments can't be parsed by JSON RPC server (missing arguments, wrong format, etc.)</td>
<td>
<ul>
Expand All @@ -516,6 +532,7 @@ Here is the exhaustive list of the error variants that can be returned by `view_
<tr>
<td>INTERNAL_ERROR</td>
<td>INTERNAL_ERROR</td>
<td>500</td>
<td>Something went wrong with the node itself or overloaded</td>
<td>
<ul>
Expand Down Expand Up @@ -669,6 +686,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
<code>error.name</code>
</th>
<th>ERROR_CAUSE<br /><code>error.cause.name</code></th>
<th>Status Code</th>
<th>Reason</th>
<th>Solution</th>
</tr>
Expand All @@ -677,6 +695,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
<tr>
<td rowspan="2">HANDLER_ERROR</td>
<td>UNKNOWN_BLOCK</td>
<td>200</td>
<td>The requested block has not been produced yet or it has been garbage-collected (cleaned up to save space on the RPC node)</td>
<td>
<ul>
Expand All @@ -687,6 +706,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
</tr>
<tr>
<td>NOT_SYNCED_YET</td>
<td>200</td>
<td>The node is still syncing and the requested block is not in the database yet</td>
<td>
<ul>
Expand All @@ -698,6 +718,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
<tr className="stripe">
<td>REQUEST_VALIDATION_ERROR</td>
<td>PARSE_ERROR</td>
<td>400</td>
<td>Passed arguments can't be parsed by JSON RPC server (missing arguments, wrong format, etc.)</td>
<td>
<ul>
Expand All @@ -709,6 +730,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
<tr>
<td>INTERNAL_ERROR</td>
<td>INTERNAL_ERROR</td>
<td>500</td>
<td>Something went wrong with the node itself or overloaded</td>
<td>
<ul>
Expand Down Expand Up @@ -862,6 +884,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
<code>error.name</code>
</th>
<th>ERROR_CAUSE<br /><code>error.cause.name</code></th>
<th>Status Code</th>
<th>Reason</th>
<th>Solution</th>
</tr>
Expand All @@ -870,6 +893,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
<tr>
<td rowspan="2">HANDLER_ERROR</td>
<td>UNKNOWN_BLOCK</td>
<td>200</td>
<td>The requested block has not been produced yet or it has been garbage-collected (cleaned up to save space on the RPC node)</td>
<td>
<ul>
Expand All @@ -880,6 +904,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
</tr>
<tr>
<td>NOT_SYNCED_YET</td>
<td>200</td>
<td>The node is still syncing and the requested block is not in the database yet</td>
<td>
<ul>
Expand All @@ -891,6 +916,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
<tr className="stripe">
<td>REQUEST_VALIDATION_ERROR</td>
<td>PARSE_ERROR</td>
<td>400</td>
<td>Passed arguments can't be parsed by JSON RPC server (missing arguments, wrong format, etc.)</td>
<td>
<ul>
Expand All @@ -902,6 +928,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
<tr>
<td>INTERNAL_ERROR</td>
<td>INTERNAL_ERROR</td>
<td>500</td>
<td>Something went wrong with the node itself or overloaded</td>
<td>
<ul>
Expand Down
17 changes: 17 additions & 0 deletions docs/5.api/rpc/block-chunk.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ Here is the exhaustive list of the error variants that can be returned by `block
<code>error.name</code>
</th>
<th>ERROR_CAUSE<br /><code>error.cause.name</code></th>
<th>Status Code</th>
<th>Reason</th>
<th>Solution</th>
</tr>
Expand All @@ -291,6 +292,7 @@ Here is the exhaustive list of the error variants that can be returned by `block
<tr>
<td rowspan="2">HANDLER_ERROR</td>
<td>UNKNOWN_BLOCK</td>
<td>200</td>
<td>The requested block has not been produced yet or it has been garbage-collected (cleaned up to save space on the RPC node)</td>
<td>
<ul>
Expand All @@ -301,6 +303,7 @@ Here is the exhaustive list of the error variants that can be returned by `block
</tr>
<tr>
<td>NOT_SYNCED_YET</td>
<td>200</td>
<td>The node is still syncing and the requested block is not in the database yet</td>
<td>
<ul>
Expand All @@ -312,6 +315,7 @@ Here is the exhaustive list of the error variants that can be returned by `block
<tr className="stripe">
<td>REQUEST_VALIDATION_ERROR</td>
<td>PARSE_ERROR</td>
<td>400</td>
<td>Passed arguments can't be parsed by JSON RPC server (missing arguments, wrong format, etc.)</td>
<td>
<ul>
Expand All @@ -323,6 +327,7 @@ Here is the exhaustive list of the error variants that can be returned by `block
<tr>
<td>INTERNAL_ERROR</td>
<td>INTERNAL_ERROR</td>
<td>500</td>
<td>Something went wrong with the node itself or overloaded</td>
<td>
<ul>
Expand Down Expand Up @@ -532,6 +537,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
<code>error.name</code>
</th>
<th>ERROR_CAUSE<br /><code>error.cause.name</code></th>
<th>Status Code</th>
<th>Reason</th>
<th>Solution</th>
</tr>
Expand All @@ -540,6 +546,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
<tr>
<td rowspan="2">HANDLER_ERROR</td>
<td>UNKNOWN_BLOCK</td>
<td>200</td>
<td>The requested block has not been produced yet or it has been garbage-collected (cleaned up to save space on the RPC node)</td>
<td>
<ul>
Expand All @@ -550,6 +557,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
</tr>
<tr>
<td>NOT_SYNCED_YET</td>
<td>200</td>
<td>The node is still syncing and the requested block is not in the database yet</td>
<td>
<ul>
Expand All @@ -561,6 +569,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
<tr className="stripe">
<td>REQUEST_VALIDATION_ERROR</td>
<td>PARSE_ERROR</td>
<td>400</td>
<td>Passed arguments can't be parsed by JSON RPC server (missing arguments, wrong format, etc.)</td>
<td>
<ul>
Expand All @@ -572,6 +581,7 @@ Here is the exhaustive list of the error variants that can be returned by `EXPER
<tr>
<td>INTERNAL_ERROR</td>
<td>INTERNAL_ERROR</td>
<td>500</td>
<td>Something went wrong with the node itself or overloaded</td>
<td>
<ul>
Expand Down Expand Up @@ -737,6 +747,7 @@ Here is the exhaustive list of the error variants that can be returned by `chunk
<code>error.name</code>
</th>
<th>ERROR_CAUSE<br /><code>error.cause.name</code></th>
<th>Status Code</th>
<th>Reason</th>
<th>Solution</th>
</tr>
Expand All @@ -745,6 +756,7 @@ Here is the exhaustive list of the error variants that can be returned by `chunk
<tr>
<td rowspan="4">HANDLER_ERROR</td>
<td>UNKNOWN_BLOCK</td>
<td>200</td>
<td>The requested block has not been produced yet or it has been garbage-collected (cleaned up to save space on the RPC node)</td>
<td>
<ul>
Expand All @@ -755,6 +767,7 @@ Here is the exhaustive list of the error variants that can be returned by `chunk
</tr>
<tr>
<td>UNKNOWN_CHUNK</td>
<td>200</td>
<td>The requested chunk can't be found in a database</td>
<td>
<ul>
Expand All @@ -765,6 +778,7 @@ Here is the exhaustive list of the error variants that can be returned by `chunk
</tr>
<tr>
<td>INVALID_SHARD_ID</td>
<td>200</td>
<td>Provided <code>shard_id</code> does not exist</td>
<td>
<ul>
Expand All @@ -774,6 +788,7 @@ Here is the exhaustive list of the error variants that can be returned by `chunk
</tr>
<tr>
<td>NOT_SYNCED_YET</td>
<td>200</td>
<td>The node is still syncing and the requested chunk is not in the database yet</td>
<td>
<ul>
Expand All @@ -785,6 +800,7 @@ Here is the exhaustive list of the error variants that can be returned by `chunk
<tr className="stripe">
<td>REQUEST_VALIDATION_ERROR</td>
<td>PARSE_ERROR</td>
<td>400</td>
<td>Passed arguments can't be parsed by JSON RPC server (missing arguments, wrong format, etc.)</td>
<td>
<ul>
Expand All @@ -796,6 +812,7 @@ Here is the exhaustive list of the error variants that can be returned by `chunk
<tr>
<td>INTERNAL_ERROR</td>
<td>INTERNAL_ERROR</td>
<td>500</td>
<td>Something went wrong with the node itself or overloaded</td>
<td>
<ul>
Expand Down
Loading

0 comments on commit 2709161

Please sign in to comment.