diff --git a/src/RPCServer.cpp b/src/RPCServer.cpp index 95f8af8bf7..758fa6888e 100644 --- a/src/RPCServer.cpp +++ b/src/RPCServer.cpp @@ -57,10 +57,12 @@ Json::Value RPCServer::RPCError(int iError) { rpcNICKNAME_MISSING, "nicknameMissing", "Nickname does not exist." }, { rpcNICKNAME_PERM, "nicknamePerm", "Account does not control nickname." }, { rpcNOT_IMPL, "notImpl", "Not implemented." }, + { rpcNO_ACCOUNT, "noAccount", "No such account." }, { rpcNO_CLOSED, "noClosed", "Closed ledger is unavailable." }, { rpcNO_CURRENT, "noCurrent", "Current ledger is unavailable." }, { rpcNO_GEN_DECRPYT, "noGenDectypt", "Password failed to decrypt master public generator." }, { rpcNO_NETWORK, "noNetwork", "Network not available." }, + { rpcNO_PERMISSION, "noPermission", "You don't have permission for this command." }, { rpcPASSWD_CHANGED, "passwdChanged", "Wrong key, password changed." }, { rpcPORT_MALFORMED, "portMalformed", "Port is malformed." }, { rpcPUBLIC_MALFORMED, "publicMalformed", "Public key is malformed." }, @@ -71,9 +73,7 @@ Json::Value RPCServer::RPCError(int iError) { rpcSUCCESS, "success", "Success." }, { rpcTXN_NOT_FOUND, "txnNotFound", "Transaction not found." }, { rpcUNKNOWN_COMMAND, "unknownCmd", "Unknown command." }, - { rpcWRONG_PASSWORD, "wrongPassword", "Wrong password." }, { rpcWRONG_SEED, "wrongSeed", "The regular key does not point as the master key." }, - { rpcNO_PERMISSION, "noPermission", "You don't have permission for this command." }, }; int i; @@ -242,7 +242,7 @@ Json::Value RPCServer::getMasterGenerator(const uint256& uLedger, const NewcoinA if (!sleGen) { // No account has been claimed or has had it password set for seed. - return RPCError(rpcWRONG_PASSWORD); + return RPCError(rpcNO_ACCOUNT); } std::vector vucCipher = sleGen->getIFieldVL(sfGenerator); diff --git a/src/RPCServer.h b/src/RPCServer.h index b9db630bb2..39535c7c05 100644 --- a/src/RPCServer.h +++ b/src/RPCServer.h @@ -36,11 +36,11 @@ public: rpcLGR_NOT_FOUND, rpcMUST_SEND_XNS, rpcNICKNAME_MISSING, + rpcNO_ACCOUNT, rpcPASSWD_CHANGED, rpcSRC_MISSING, rpcSRC_UNCLAIMED, rpcTXN_NOT_FOUND, - rpcWRONG_PASSWORD, rpcWRONG_SEED, // Malformed command