wingbot-mongodb 3.2.3 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/BaseStorage.js +3 -2
package/package.json
CHANGED
package/src/BaseStorage.js
CHANGED
|
@@ -330,7 +330,6 @@ class BaseStorage {
|
|
|
330
330
|
fixtures = fixtures
|
|
331
331
|
.filter((f) => !f._id || !found.includes(f._id.toString()));
|
|
332
332
|
}
|
|
333
|
-
|
|
334
333
|
}
|
|
335
334
|
|
|
336
335
|
if (!updated || fixtures.length === 0) {
|
|
@@ -342,7 +341,9 @@ class BaseStorage {
|
|
|
342
341
|
.then(() => collection.insertOne(o))
|
|
343
342
|
.then(() => this._log.log(`DB.${this._collectionName} Inserted fixture doc to "${this._collectionName}"`))
|
|
344
343
|
.catch((e) => {
|
|
345
|
-
if (e.code
|
|
344
|
+
if (e.code === 11000) {
|
|
345
|
+
this._log.log(`DB.${this._collectionName} fixture not inserted: ${e.message}`);
|
|
346
|
+
} else {
|
|
346
347
|
this._log.error(`DB.${this._collectionName} failed to insert fixture doc to "${this._collectionName}"`, e);
|
|
347
348
|
}
|
|
348
349
|
}),
|