feat(xo-server/getBackupNgLogs): dont fail on undefined/null errors

See xoa-support#2663

This should almost never happen but if it does, it should not prevent logs from being consolidated.
This commit is contained in:
Julien Fontanet 2020-07-03 08:42:23 +02:00
parent 2198853662
commit 44ff2f872d

View File

@ -4,9 +4,10 @@ import { forEach, isEmpty, iteratee, sortedIndexBy } from 'lodash'
import { debounceWithKey } from '../_pDebounceWithKey' import { debounceWithKey } from '../_pDebounceWithKey'
const isSkippedError = error => const isSkippedError = error =>
error.message === 'no disks found' || error != null &&
error.message === 'no VMs match this pattern' || (error.message === 'no disks found' ||
error.message === 'unhealthy VDI chain' error.message === 'no VMs match this pattern' ||
error.message === 'unhealthy VDI chain')
const getStatus = ( const getStatus = (
error, error,