include searched_all in error response of tx (#407)

This commit is contained in:
CJ Cobb
2022-11-21 15:52:59 -06:00
committed by GitHub
parent 5c9dce0f8a
commit cf7a6ecc89
3 changed files with 33 additions and 1 deletions

View File

@@ -106,7 +106,7 @@ makeError(Status const& status)
return str.empty() ? nullopt : make_optional(str);
};
return visit(
auto res = visit(
overloadSet{
[&status, &wrapOptional](RippledError err) {
if (err == ripple::rpcUNKNOWN)
@@ -130,6 +130,14 @@ makeError(Status const& status)
},
},
status.code);
if (status.extraInfo)
{
for (auto& [key, value] : status.extraInfo.value())
{
res[key] = value;
}
}
return res;
}
} // namespace RPC