Skip to content

Commit 784ad9e

Browse files
committed
fix(Diff): Improved logging on "failed to map parentId" error
Signed-off-by: Marcel Klehr <[email protected]>
1 parent 64b6e5b commit 784ad9e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/lib/Diff.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,12 @@ export default class Diff<L1 extends TItemLocation, L2 extends TItemLocation, A
227227
Logger.log('Removing MOVE action from plan:', action)
228228
return
229229
} else {
230-
Logger.log('Failed to map parentId of action ' + action)
231-
throw new Error('Failed to map parentId: ' + action.payload.parentId)
230+
Logger.log('payload.location = ' + action.payload.location + ' | targetLocation = ' + targetLocation)
231+
const diff = new Diff()
232+
diff.commit(action)
233+
Logger.log('Failed to map parentId of action ' + diff.inspect())
234+
Logger.log(JSON.stringify(mappingsSnapshot, null,'\t'))
235+
throw new Error('Failed to map parentId to ' + targetLocation + ': ' + action.payload.parentId)
232236
}
233237
}
234238
}

0 commit comments

Comments
 (0)