HomePhabricator

RPC: make RPCResult::MatchesType return useful errors

Description

RPC: make RPCResult::MatchesType return useful errors

Summary:

Currently if you don't correctly update the description of the return value for an RPC call, you essentially just get an assertion failure with no useful information; this generates a description of the problems instead.

Backport of core#26887.

Contains a layout leftover from D16252.

Depends on D16252.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

Differential Revision: https://reviews.bitcoinabc.org/D16253

Details

Provenance
Anthony Towns <aj@erisian.com.au>Authored on Jan 13 2023, 10:27
FabienCommitted on May 30 2024, 12:57
teamcityPushed on May 30 2024, 13:02
Parents
rSTAGINGb739b2f4f3b8: rpc: Fail to return undocumented or misdocumented JSON
Branches
Unknown
Tags
Unknown

Event Timeline