Skip to content

Commit fab5a27

Browse files
authored
Merge pull request #5 from arduino/catch-getuserid-errors
Let the wrapping Promise handle network errors thrown by getUserId
2 parents ba4d59d + 7da959f commit fab5a27

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,7 @@ const connect = options => new Promise((resolve, reject) => {
171171
}
172172

173173
client.connect(connectionOpts);
174-
}, (error) => {
175-
throw new Error(error);
176-
});
174+
}, reject);
177175
});
178176

179177
const disconnect = id => new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)