Skip to content

Commit f6e6fad

Browse files
committed
Merge bitcoin/bitcoin#34867: wallet: document importdescriptors error object fields
445143b wallet: document structured importdescriptors errors (Renato Britto) Pull request description: Related to #29912 and the machine-readable OpenRPC generated from `RPCHelpMan` metadata work discussed in #34683. Split out from #34764 per review feedback that this change is conceptually separate from the broader elision work there. The `importdescriptors` RPC help currently documents the optional `error` field using an elided `JSONRPC error` placeholder. This PR replaces that with explicit `code` and `message` fields. `importdescriptors` already returns a structured JSON-RPC error object in practice, so this makes the documented result schema match the existing response shape more closely. This PR changes `importdescriptors` help text, and the runtime checks on the returned json to be more strict. ACKs for top commit: nervana21: tACK 445143b maflcko: lgtm ACK 445143b Tree-SHA512: 3bda1cc7dd222c1d2e4dfbb2ee4a3f0201914c8b6bed5efb7fe7866227867c43235a9c5f5ec6f56e7ba286db0a43962c782d7ff29eec9aef4e70dc2c3daa6a0e
2 parents 0e2122c + 445143b commit f6e6fad

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/wallet/rpc/backup.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,8 @@ RPCHelpMan importdescriptors()
343343
}},
344344
{RPCResult::Type::OBJ, "error", /*optional=*/true, "",
345345
{
346-
{RPCResult::Type::ELISION, "", "JSONRPC error"},
346+
{RPCResult::Type::NUM, "code", "JSONRPC error code"},
347+
{RPCResult::Type::STR, "message", "JSONRPC error message"},
347348
}},
348349
}},
349350
}

0 commit comments

Comments
 (0)