mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
test: log e11000 errors
This commit is contained in:
@@ -443,7 +443,8 @@ module.exports = function (module) {
|
||||
// https://github.com/NodeBB/NodeBB/issues/4467
|
||||
// https://jira.mongodb.org/browse/SERVER-14322
|
||||
// https://docs.mongodb.org/manual/reference/command/findAndModify/#upsert-and-unique-index
|
||||
if (err && err.message.startsWith('E11000 duplicate key error')) {
|
||||
if (err && err.message.includes('E11000 duplicate key error')) {
|
||||
console.log(new Error('e11000').stack, key, increment, value);
|
||||
return await module.sortedSetIncrBy(key, increment, value);
|
||||
}
|
||||
throw err;
|
||||
|
||||
Reference in New Issue
Block a user