ReferenceError:未定义err我无法解决错误

我的代码如下,为什么我会收到这样的错误;

“ ReferenceError:未定义err”

else if (processMethod.toUpperCase() === "COVID") {
    console.log("white", "get covid statics...");
    targetCountry = (await covid.parseCountry(UK)).countryid;
    if (err.message === "Failed to get country." || err.message === "Invalid Country Code") {

        const ErrMsg2 = new Discord.RichEmbed()
            ErrMsg2.setColor(0x00AE86)
            ErrMsg2.setTimestamp()
            ErrMsg2.setAuthor(message.author.username, message.author.avatarURL)
            ErrMsg2.setThumbnail(message.guild.iconURL)
            ErrMsg2.setDescription(`Failed Try Again`)
            ErrMsg2.setFooter("COVID SERVICES")
            message.channel.sendEmbed(ErrMsg2);
    }

}