add error message for testing

This commit is contained in:
Barış Soner Uşaklı
2023-07-15 22:23:29 -04:00
parent d1132ac44a
commit 052f1f2232

View File

@@ -255,6 +255,7 @@ 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
console.log('test', err.message);
if (err && err.message.startsWith('E11000 duplicate key error')) {
return await module.incrObjectFieldBy(key, field, value);
}