mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 22:15:52 +00:00
Disambiguate rpcSRC_ACT_NOT_FOUND errors so it's clear when it's the
secret that's at fault.
This commit is contained in:
@@ -60,6 +60,7 @@ Json::Value rpcError(int iError, Json::Value jvResult)
|
|||||||
{ rpcSRC_ACT_MALFORMED, "srcActMalformed", "Source account is malformed." },
|
{ rpcSRC_ACT_MALFORMED, "srcActMalformed", "Source account is malformed." },
|
||||||
{ rpcSRC_ACT_MISSING, "srcActMissing", "Source account not provided." },
|
{ rpcSRC_ACT_MISSING, "srcActMissing", "Source account not provided." },
|
||||||
{ rpcSRC_ACT_NOT_FOUND, "srcActNotFound", "Source account not found." },
|
{ rpcSRC_ACT_NOT_FOUND, "srcActNotFound", "Source account not found." },
|
||||||
|
{ rpcBAD_SECRET, "badSecret", "Secret does not match account." },
|
||||||
{ rpcSRC_AMT_MALFORMED, "srcAmtMalformed", "Source amount/currency/issuer is malformed." },
|
{ rpcSRC_AMT_MALFORMED, "srcAmtMalformed", "Source amount/currency/issuer is malformed." },
|
||||||
{ rpcSRC_CUR_MALFORMED, "srcCurMalformed", "Source currency is malformed." },
|
{ rpcSRC_CUR_MALFORMED, "srcCurMalformed", "Source currency is malformed." },
|
||||||
{ rpcSRC_ISR_MALFORMED, "srcIsrMalformed", "Source issuer is malformed." },
|
{ rpcSRC_ISR_MALFORMED, "srcIsrMalformed", "Source issuer is malformed." },
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ enum {
|
|||||||
rpcSRC_AMT_MALFORMED,
|
rpcSRC_AMT_MALFORMED,
|
||||||
rpcSRC_CUR_MALFORMED,
|
rpcSRC_CUR_MALFORMED,
|
||||||
rpcSRC_ISR_MALFORMED,
|
rpcSRC_ISR_MALFORMED,
|
||||||
|
rpcBAD_SECRET,
|
||||||
|
|
||||||
// Internal error (should never happen)
|
// Internal error (should never happen)
|
||||||
rpcINTERNAL, // Generic internal error.
|
rpcINTERNAL, // Generic internal error.
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ Json::Value RPCHandler::transactionSign(Json::Value jvRequest, bool bSubmit)
|
|||||||
|
|
||||||
if (!bFound)
|
if (!bFound)
|
||||||
{
|
{
|
||||||
return rpcError(rpcSRC_ACT_NOT_FOUND);
|
return rpcError(rpcBAD_SECRET);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use the generator to determine the associated public and private keys.
|
// Use the generator to determine the associated public and private keys.
|
||||||
|
|||||||
Reference in New Issue
Block a user