forked from near/nearcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(jsonrpc): Add structured errors to query method in ViewClien…
…t and RPC (near#3944) * Introduce some error struct into runtime/runtime/state_viewer. Refactoring query method to add structurred errors there WIP * Fix rosetta-rpc, update runtime's adapter trait * Add missed handler from rebasing with master * Refactor new error structs to be more explicit. Runtime call function, view state and access key methods return typical errors instead of QueryError * Extend missed error variants to be explicit * Address review suggestion, create dummy for testing rpc query method * Fix some naming issues * Adjust error structures * Update rpc_query tests * Add block_height and block_hash to error variants where it is possible * Address review suggestions. Backward compatible resposne from query * Make backward compatibility in `query` method via near_client::QueryError instead of RpcQueryError * Fix some tests * Address review suggestion * Fix tests according to changes in jsonrpc query method refactoring * Drop QueryResponseKind::Error variant and add backward compatibility on JSON-RPC side * Remove redundant commented code * Add tests for query method. Address issue with wrong refactor logic * Clean up and make more strict test check * run cargo fmt * Mark rpc routing tests as ignore * Fix tests
- Loading branch information
Showing
40 changed files
with
1,182 additions
and
558 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.