wallet: document structured importdescriptors errors
What changed, and why it matters
This commit is a documentation-only change. It updates the help text for the importdescriptors command to show that error responses include a numeric 'code' and a text 'message', instead of a vague placeholder. No code behavior changed, and there is no security issue here.
No action needed. This is a non-security documentation fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies the RPCHelpMan result schema for the importdescriptors RPC in src/wallet/rpc/backup.cpp. It replaces a single ELISION result entry labeled ‘JSONRPC error’ with two explicit fields: a NUM ‘code’ and a STR ‘message’. The actual RPC implementation and error-returning behavior are unchanged; only the documented schema is made more precise.
Changed components
src/wallet/rpc/backup.cppInspect captured patch +2 / −1
diff --git a/src/wallet/rpc/backup.cpp b/src/wallet/rpc/backup.cpp
index 9b70f5bb..8c5a30ff 100644
--- a/src/wallet/rpc/backup.cpp
+++ b/src/wallet/rpc/backup.cpp
@@ -343,7 +343,8 @@ RPCHelpMan importdescriptors()
}},
{RPCResult::Type::OBJ, "error", /*optional=*/true, "",
{
- {RPCResult::Type::ELISION, "", "JSONRPC error"},
+ {RPCResult::Type::NUM, "code", "JSONRPC error code"},
+ {RPCResult::Type::STR, "message", "JSONRPC error message"},
}},
}},
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.