Improve error reporting for account not found.

This commit is contained in:
Arthur Britto
2013-01-08 18:04:00 -08:00
parent ef775727d4
commit 8e801158b3
4 changed files with 17 additions and 5 deletions

View File

@@ -932,7 +932,13 @@ Json::Value RPCHandler::doSubmit(Json::Value jvRequest)
}
AccountState::pointer asSrc = mNetOps->getAccountState(mNetOps->getCurrentLedger(), raSrcAddressID);
if (!asSrc) return rpcError(rpcSRC_ACT_MALFORMED);
if (!asSrc)
{
cLog(lsDEBUG) << boost::str(boost::format("doSubmit: Failed to find source account in current ledger: %s")
% raSrcAddressID.humanAccountID());
return rpcError(rpcSRC_ACT_NOT_FOUND);
}
if ("Payment" == txJSON["TransactionType"].asString())
{