mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05: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
1 changed files with 8 additions and 1 deletions
|
@ -55,9 +55,16 @@ module.exports = function (Bookshelf) {
|
||||||
|
|
||||||
if (Object.keys(changed).length) {
|
if (Object.keys(changed).length) {
|
||||||
if (clientUpdatedAt.diff(serverUpdatedAt) !== 0) {
|
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({
|
return Promise.reject(new errors.UpdateCollisionError({
|
||||||
message: 'Saving failed! Someone else is editing this post.',
|
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…
Add table
Reference in a new issue