Skip to content

Commit

Permalink
fix(Diff): Improved logging on "failed to map parentId" error
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Nov 17, 2024
1 parent 64b6e5b commit 784ad9e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib/Diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,12 @@ export default class Diff<L1 extends TItemLocation, L2 extends TItemLocation, A
Logger.log('Removing MOVE action from plan:', action)
return
} else {
Logger.log('Failed to map parentId of action ' + action)
throw new Error('Failed to map parentId: ' + action.payload.parentId)
Logger.log('payload.location = ' + action.payload.location + ' | targetLocation = ' + targetLocation)
const diff = new Diff()
diff.commit(action)
Logger.log('Failed to map parentId of action ' + diff.inspect())
Logger.log(JSON.stringify(mappingsSnapshot, null,'\t'))
throw new Error('Failed to map parentId to ' + targetLocation + ': ' + action.payload.parentId)
}
}
}
Expand Down

0 comments on commit 784ad9e

Please sign in to comment.