Skip to content

Commit 4268426

Browse files
committed
Merge #11002: [wallet] return correct error code from resendwallettransaction
055d95f [wallet] return correct error code from resendwallettransaction (John Newbery) Pull request description: New code in #10995 uses `RPC_INVALID_REQUEST`. According to the comment in rpc/protocol.h: ``` // RPC_INVALID_REQUEST is internally mapped to HTTP_BAD_REQUEST (400). // It should not be used for application-layer errors. ``` Change the returned error code to `RPC_WALLET_ERROR` #11000 will need to be updated to test for the correct error code. Tree-SHA512: 0201b3a2091adf17ad301825da5bd29f0ea7e284b5394cbef80483fc293a558acc849f74a0780bb8501acab324fc722e41ae049cffec7afb76884e26df4b809e
2 parents 627c3c0 + 055d95f commit 4268426

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2599,7 +2599,7 @@ UniValue resendwallettransactions(const JSONRPCRequest& request)
25992599
LOCK2(cs_main, pwallet->cs_wallet);
26002600

26012601
if (!pwallet->GetBroadcastTransactions()) {
2602-
throw JSONRPCError(RPC_INVALID_REQUEST, "Error: Wallet transaction broadcasting is disabled with -walletbroadcast");
2602+
throw JSONRPCError(RPC_WALLET_ERROR, "Error: Wallet transaction broadcasting is disabled with -walletbroadcast");
26032603
}
26042604

26052605
std::vector<uint256> txids = pwallet->ResendWalletTransactionsBefore(GetTime(), g_connman.get());

0 commit comments

Comments
 (0)