[go: up one dir, main page]

Rpc_http: handle RPC exceptions

This simple MR aims to catch Lwt failure from RPC, so that, a Lwt.fail Not_found is now handled and forwarded to the node, as expected. Before that, Lwt failures were failing at top level.

Manually testing the MR

The following RPCs both call the resolution of the chain_id but the monitor one fails in Lwt and the other as an exception. To trigger the behavior it is needed to use the vicall@reload-store branch, that aims to handle locally some RPCs. Then, run the following:

curl -s -v 'localhost:18731/chains/test/chain_id' -> raises a Not_found exception that is redirected to the node

curl -v 'localhost:18731/monitor/heads/test' -> raises a lwt failure and fails at top level, without any redirectior

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports

Loading