From b01a47cbc1ae04a666005848a4bba4a670dc5480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 21 Oct 2019 16:12:52 -0400 Subject: [PATCH] feat: log errors from mubsub --- src/database/mongo/pubsub.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/database/mongo/pubsub.js b/src/database/mongo/pubsub.js index 8244c884d8..d29065a68d 100644 --- a/src/database/mongo/pubsub.js +++ b/src/database/mongo/pubsub.js @@ -2,6 +2,9 @@ const mubsub = require('mubsub-nbb'); const connection = require('./connection'); -const client = mubsub(connection.getConnectionString(), connection.getConnectionOptions()); -module.exports = client.channel('pubsub'); +const client = mubsub(connection.getConnectionString(), connection.getConnectionOptions()); +client.on('error', err => console.error(err)); +const channel = client.channel('pubsub'); +channel.on('error', err => console.error(err)); +module.exports = channel;