From 7da959f2ba00ba1aa3ac4ef971fe23caf2d0b49d Mon Sep 17 00:00:00 2001 From: Luca Barbetti <l.barbetti@topsolution.it> Date: Fri, 14 Dec 2018 12:00:19 +0100 Subject: [PATCH] Let the wrapping Promise handle network errors thrown by getUserId --- src/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 7919080..5a2cbc0 100644 --- a/src/index.js +++ b/src/index.js @@ -171,9 +171,7 @@ const connect = options => new Promise((resolve, reject) => { } client.connect(connectionOpts); - }, (error) => { - throw new Error(error); - }); + }, reject); }); const disconnect = id => new Promise((resolve, reject) => {