mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-23 07:00:21 +00:00
export error reason via submit/simulate
This commit is contained in:
@@ -239,6 +239,7 @@ JSS(enabled); // out: AmendmentTable
|
||||
JSS(engine_result); // out: NetworkOPs, TransactionSign, Submit
|
||||
JSS(engine_result_code); // out: NetworkOPs, TransactionSign, Submit
|
||||
JSS(engine_result_message); // out: NetworkOPs, TransactionSign, Submit
|
||||
JSS(engine_result_reason); // out: NetworkOPs, TransactionSign, Submit
|
||||
JSS(entire_set); // out: get_aggregate_price
|
||||
JSS(ephemeral_key); // out: ValidatorInfo
|
||||
// in/out: Manifest
|
||||
|
||||
@@ -3321,6 +3321,7 @@ NetworkOPsImp::transJson(
|
||||
jvObj[jss::engine_result] = sToken;
|
||||
jvObj[jss::engine_result_code] = result;
|
||||
jvObj[jss::engine_result_message] = sHuman;
|
||||
jvObj[jss::engine_result_reason] = result.reason;
|
||||
|
||||
if (transaction->getTxnType() == ttOFFER_CREATE)
|
||||
{
|
||||
|
||||
@@ -804,6 +804,7 @@ transactionFormatResultImpl(Transaction::pointer tpTrans, unsigned apiVersion)
|
||||
jvResult[jss::engine_result] = sToken;
|
||||
jvResult[jss::engine_result_code] = tpTrans->getResult();
|
||||
jvResult[jss::engine_result_message] = sHuman;
|
||||
jvResult[jss::engine_result_reason] = tpTrans->getResult().reason;
|
||||
}
|
||||
}
|
||||
catch (std::exception&)
|
||||
|
||||
@@ -264,6 +264,7 @@ simulateTxn(RPC::JsonContext& context, std::shared_ptr<Transaction> transaction)
|
||||
jvResult[jss::engine_result] = token;
|
||||
jvResult[jss::engine_result_code] = result.ter;
|
||||
jvResult[jss::engine_result_message] = message;
|
||||
jvResult[jss::engine_result_reason] = result.ter.reason;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -272,6 +273,7 @@ simulateTxn(RPC::JsonContext& context, std::shared_ptr<Transaction> transaction)
|
||||
jvResult[jss::engine_result] = "unknown";
|
||||
jvResult[jss::engine_result_code] = result.ter;
|
||||
jvResult[jss::engine_result_message] = "unknown";
|
||||
jvResult[jss::engine_result_reason] = "unknown";
|
||||
// LCOV_EXCL_STOP
|
||||
}
|
||||
|
||||
|
||||
@@ -154,6 +154,7 @@ doSubmit(RPC::JsonContext& context)
|
||||
jvResult[jss::engine_result] = sToken;
|
||||
jvResult[jss::engine_result_code] = transaction->getResult();
|
||||
jvResult[jss::engine_result_message] = sHuman;
|
||||
jvResult[jss::engine_result_reason] = transaction->getResult().reason;
|
||||
|
||||
auto const submitResult = transaction->getSubmitResult();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user