@event-driven-io/emmett-mongodb 0.43.0-beta.1 → 0.43.0-beta.2
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/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -52,13 +52,14 @@ var _uuid = require('uuid');
|
|
|
52
52
|
var _asyncretry = require('async-retry'); var _asyncretry2 = _interopRequireDefault(_asyncretry);
|
|
53
53
|
|
|
54
54
|
|
|
55
|
+
|
|
55
56
|
async function tryPublishMessagesAfterCommit(messages, options, context) {
|
|
56
57
|
if (_optionalChain([options, 'optionalAccess', _4 => _4.onAfterCommit]) === void 0) return false;
|
|
57
58
|
try {
|
|
58
59
|
await _optionalChain([options, 'optionalAccess', _5 => _5.onAfterCommit, 'call', _6 => _6(messages, context)]);
|
|
59
60
|
return true;
|
|
60
|
-
} catch (
|
|
61
|
-
console.error(`Error in on after commit hook`,
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error(`Error in on after commit hook`, error);
|
|
62
63
|
return false;
|
|
63
64
|
}
|
|
64
65
|
}
|