https://travis-ci.org/github/bitcoin/bitcoin/jobs/680452476#L6107
LOCK(existing_spk_manager->cs_desc_man);
            if (range_start > existing_spk_manager->GetWalletDescriptor().range_start) {
                throw JSONRPCError(RPC_INVALID_PARAMS, strprintf("range_start can only decrease; current range = [%d,%d]", existing_spk_manager->GetWalletDescriptor().range_start, existing_spk_manager->GetWalletDescriptor().range_end));
            }
        }
        
        auto spk_manager = pwallet->AddWalletDescriptor(w_desc, keys, label);
        if (spk_manager == nullptr) {
            throw JSONRPCError(RPC_WALLET_ERROR, strprintf("Could not add descriptor '%s'", descriptor));
        }
        
        if (active) {
            if (!w_desc.descriptor->GetOutputType()) {
                warnings.push_back("Unknown output type, cannot set descriptor to active.");
            } else {
                pwallet->AddActiveScriptPubKeyMan(spk_manager->GetID(), *w_desc.descriptor->GetOutputType(), internal);
            }
        }
        result.pushKV("success", UniValue(true));
    } catch (const UniValue& e) {
        result.pushKV("success", UniValue(false));
        result.pushKV("error", e);
    } catch (...) {
        result.pushKV("success", UniValue(false));
        result.pushKV("error", JSONRPCError(RPC_MISC_ERROR, "Missing required fields"));
    }
    if (warnings.size()) result.pushKV("warnings", warnings);
    return result;
}
RPCHelpMan importdescriptors()