This differs from behaviour of `importaddress` where it works.
```
$ bitcoin-cli importaddress "<address>" "<label>" false
```
vs
```
$ bitcoin-cli importmulti '[{ "scriptPubKey": { "address": "<address>" }, "timestamp":0, "label": "<label>", "watchonly": true }]' '{ "rescan": false }'
error code: -13
error message:
Error: Please enter the wallet passphrase with walletpassphrase first.
```
+ HelpExampleRpc("dumpwallet", "\"test\"")
                },
        [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
    const std::shared_ptr<const CWallet> pwallet = GetWalletForJSONRPCRequest(request);
    if (!pwallet) return UniValue::VNULL;
    const CWallet& wallet = *pwallet;
    const LegacyScriptPubKeyMan& spk_man = EnsureConstLegacyScriptPubKeyMan(wallet);
    // 
    // 
    wallet.BlockUntilSyncedToCurrentChain();
    LOCK(wallet.cs_wallet);
    EnsureWalletIsUnlocked(wallet);
    fs::path filepath = fs::u8path(request.params[0].get_str());
    filepath = fs::absolute(filepath);
    /* Prevent arbitrary files from being overwritten. There have been reports
     * that users have overwritten wallet files this way:
     * https://github.com/bitcoin/bitcoin/issues/9934
     * It may also avoid other security issues.
     */
    if (fs::exists(filepath)) {
        throw JSONRPCError(RPC_INVALID_PARAMETER, filepath.u8string() + " already exists. If you are sure this is what you want, move it out of the way first");
    }
    std::ofstream file;
    file.open(filepath);
    if (!file.is_open())
        throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot open wallet dump file");
    std::map<CKeyID, int64_t> mapKeyBirth;
    wallet.GetKeyBirthTimes(mapKeyBirth);
    int64_t block_time = 0;