From 30e790bf122da291d2b27f52cdde767a76386132 Mon Sep 17 00:00:00 2001 From: Katharina Irrgang Date: Thu, 5 Oct 2017 13:24:21 +0200 Subject: [PATCH] Debug: Update Collision (#9103) refs #8969 - we would like to figure out how often people get the error and with which context --- core/server/models/plugins/collision.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/server/models/plugins/collision.js b/core/server/models/plugins/collision.js index fa43f8f487..a63e83033e 100644 --- a/core/server/models/plugins/collision.js +++ b/core/server/models/plugins/collision.js @@ -55,9 +55,16 @@ module.exports = function (Bookshelf) { if (Object.keys(changed).length) { if (clientUpdatedAt.diff(serverUpdatedAt) !== 0) { + // @TODO: Remove later. We want to figure out how many people experience the error in which context. return Promise.reject(new errors.UpdateCollisionError({ message: 'Saving failed! Someone else is editing this post.', - code: 'UPDATE_COLLISION' + code: 'UPDATE_COLLISION', + level: 'critical', + context: JSON.stringify({ + clientUpdatedAt: self.clientData.updated_at, + serverUpdatedAt: self.serverData.updated_at, + changed: changed + }) })); } }