diff --git a/services/track-changes/app/coffee/DiffGenerator.coffee b/services/track-changes/app/coffee/DiffGenerator.coffee index 53f7c2d343..b4e0156f02 100644 --- a/services/track-changes/app/coffee/DiffGenerator.coffee +++ b/services/track-changes/app/coffee/DiffGenerator.coffee @@ -50,7 +50,11 @@ module.exports = DiffGenerator = rewindUpdates: (content, updates) -> for update in updates.reverse() - content = DiffGenerator.rewindUpdate(content, update) + try + content = DiffGenerator.rewindUpdate(content, update) + catch e + e.attempted_update = update # keep a record of the attempted update + throw e # rethrow the exception return content buildDiff: (initialContent, updates) ->