mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Fix misleading "Method not found" multiwallet errors
Raise RPC_WALLET_NOT_SPECIFIED instead of RPC_METHOD_NOT_FOUND when a required wallet filename was not specified in an RPC call. Also raise more specific RPC_WALLET_NOT_FOUND error instead of RPC_INVALID_PARAMETER in case an invalid wallet was specified, for consistency.
This commit is contained in:
@@ -82,6 +82,8 @@ enum RPCErrorCode
|
||||
RPC_WALLET_WRONG_ENC_STATE = -15, //!< Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.)
|
||||
RPC_WALLET_ENCRYPTION_FAILED = -16, //!< Failed to encrypt the wallet
|
||||
RPC_WALLET_ALREADY_UNLOCKED = -17, //!< Wallet is already unlocked
|
||||
RPC_WALLET_NOT_FOUND = -18, //!< Invalid wallet specified
|
||||
RPC_WALLET_NOT_SPECIFIED = -19, //!< No wallet specified (error when there are multiple wallets loaded)
|
||||
};
|
||||
|
||||
UniValue JSONRPCRequestObj(const std::string& strMethod, const UniValue& params, const UniValue& id);
|
||||
|
||||
Reference in New Issue
Block a user