At a minimum, help text should note this. This is true for things like addwitnessaddress especially.
case BumpFeeResult::INVALID_PARAMETER:
                throw JSONRPCError(RPC_INVALID_PARAMETER, feeBump.getErrors()[0]);
                break;
            case BumpFeeResult::WALLET_ERROR:
                throw JSONRPCError(RPC_WALLET_ERROR, feeBump.getErrors()[0]);
                break;
            default:
                throw JSONRPCError(RPC_MISC_ERROR, feeBump.getErrors()[0]);
                break;
        }
    }
    
    if (!feeBump.signTransaction(pwallet)) {
        throw JSONRPCError(RPC_WALLET_ERROR, "Can't sign transaction.");
    }
    
    if(!feeBump.commit(pwallet)) {
        throw JSONRPCError(RPC_WALLET_ERROR, feeBump.getErrors()[0]);
    }
    UniValue result(UniValue::VOBJ);
    result.push_back(Pair("txid", feeBump.getBumpedTxId().GetHex()));
    result.push_back(Pair("origfee", ValueFromAmount(feeBump.getOldFee())));
    result.push_back(Pair("fee", ValueFromAmount(feeBump.getNewFee())));
    UniValue errors(UniValue::VARR);
    for (const std::string& err: feeBump.getErrors())
        errors.push_back(err);
    result.push_back(Pair("errors", errors));
    return result;
}
UniValue generate(const JSONRPCRequest& request)