chore(xen-api/events): prints errors
This commit is contained in:
parent
fe0dcbacc5
commit
3279728e4b
@ -956,7 +956,11 @@ export class Xapi extends EventEmitter {
|
|||||||
async _watchEventsWrapper() {
|
async _watchEventsWrapper() {
|
||||||
if (!this._watching) {
|
if (!this._watching) {
|
||||||
this._watching = true
|
this._watching = true
|
||||||
await ignoreErrors.call(this._watchEvents())
|
try {
|
||||||
|
await this._watchEvents()
|
||||||
|
} catch (error) {
|
||||||
|
console.error('_watchEventsWrapper', error)
|
||||||
|
}
|
||||||
this._watching = false
|
this._watching = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -997,9 +1001,12 @@ export class Xapi extends EventEmitter {
|
|||||||
this._addObject(type, ref, record)
|
this._addObject(type, ref, record)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} catch (_) {
|
} catch (error) {
|
||||||
// there is nothing ideal to do here, do not interrupt event
|
// there is nothing ideal to do here, do not interrupt event
|
||||||
// handling
|
// handling
|
||||||
|
if (error != null && error.code !== 'MESSAGE_REMOVED') {
|
||||||
|
console.warn('_watchEvents', 'initial fetch', type, error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user