[fix] "undefined" in BMA watcher subject
This commit is contained in:
@@ -25,8 +25,12 @@ export function urlWatcher(conf: Conf, checkValidity: (data: any) => Promise<Url
|
||||
urlConf.name,
|
||||
async () => {
|
||||
let interval: NodeJS.Timer;
|
||||
const res = await Axios.get(urlConf.address)
|
||||
await checkResult(res.data)
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user