From c87ebee6a707d1031fedf2247b440e6aab04332d Mon Sep 17 00:00:00 2001 From: cel Date: Fri, 10 Apr 2020 16:11:38 -0400 Subject: Less errors --- lib/contacts.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'lib/contacts.js') diff --git a/lib/contacts.js b/lib/contacts.js index 39e8cee..3d3cec9 100644 --- a/lib/contacts.js +++ b/lib/contacts.js @@ -160,11 +160,15 @@ Contacts.prototype.createContactStreams = function (opts) { var blockers = defer.source() var enemies = defer.source() var friends = this.createFriendsStream(opts, function (err, more) { - follows.resolve(err ? pull.error(err) : pull.values(more.follows)) - followers.resolve(err ? pull.error(err) : pull.values(more.followers)) - blocks.resolve(err ? pull.error(err) : pull.values(more.blocks)) - blockers.resolve(err ? pull.error(err) : pull.values(more.blockers)) - enemies.resolve(err ? pull.error(err) : pull.values(more.enemies)) + try { + follows.resolve(err ? pull.error(err) : pull.values(more.follows)) + followers.resolve(err ? pull.error(err) : pull.values(more.followers)) + blocks.resolve(err ? pull.error(err) : pull.values(more.blocks)) + blockers.resolve(err ? pull.error(err) : pull.values(more.blockers)) + enemies.resolve(err ? pull.error(err) : pull.values(more.enemies)) + } catch(e) { + console.trace(e) + } }) return { friends: friends, -- cgit v1.2.3