feat(xo-server/vm.migrate): ensure original error is logged

Fixes https://github.com/vatesfr/xen-orchestra/pull/4364/files#r488539823
This commit is contained in:
Julien Fontanet 2020-10-01 14:52:38 +02:00
parent 24a69bcade
commit 83ea57d825

View File

@ -517,6 +517,9 @@ export async function migrate({
})
.catch(error => {
if (error?.code !== undefined) {
// make sure we log the original error
log.warn('vm.migrate', { error })
throw operationFailed({ objectId: vm.id, code: error.code })
}
throw error