[fix] "undefined" in BMA watcher subject

This commit is contained in:
2020-09-20 15:12:46 +02:00
parent c41fffe976
commit bf156e7c95

View File

@@ -25,8 +25,12 @@ export function urlWatcher(conf: Conf, checkValidity: (data: any) => Promise<Url
urlConf.name,
async () => {
let interval: NodeJS.Timer;
try {
const res = await Axios.get(urlConf.address)
await checkResult(res.data)
} catch (e) {
throw new UrlWatcherError(e.message || e)
}
interval = setInterval(async () => {
try {
const res = await Axios.get(urlConf.address)