mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Debug: Update Collision (#9103)
refs #8969 - we would like to figure out how often people get the error and with which context
This commit is contained in:
parent
7800ed3d8b
commit
30e790bf12
@ -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
|
||||
})
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user