mirror of
https://github.com/YuzuZensai/Cloudflare-DDNS-Updater.git
synced 2026-01-31 14:57:12 +00:00
Catch API errors
This commit is contained in:
@@ -71,8 +71,13 @@ class Deamon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const IPv4 = await this.getCurrentIPv4();
|
let IPv4, IPv6;
|
||||||
const IPv6 = await this.getCurrentIPv6();
|
try {
|
||||||
|
IPv4 = await this.getCurrentIPv4();
|
||||||
|
IPv6 = await this.getCurrentIPv6();
|
||||||
|
} catch(err) {
|
||||||
|
Logger.error(`Unable to fetch ip address: ${err}`);
|
||||||
|
}
|
||||||
|
|
||||||
IPv4 && Logger.info(`Current IPv4 address: ${IPv4}`);
|
IPv4 && Logger.info(`Current IPv4 address: ${IPv4}`);
|
||||||
IPv6 && Logger.info(`Current IPv6 address: ${IPv6}`);
|
IPv6 && Logger.info(`Current IPv6 address: ${IPv6}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user