karbassi / netatmo

A node.js module to hook into the netatmo API.
MIT License
57 stars 46 forks source link

Missing credentials throws unhandled error event #8

Closed solick closed 8 years ago

solick commented 9 years ago

I´m facing the following problem:

Passing empty credentials to object instantation causes an unhandled error event. If i pass valid information, the authenticated event will be successfully emitted and cought:

var api = new netatmo(auth);

 api.on("error", function(err) {

    console.log(err);
});

api.on("warning", function(warning) {

    console.log(warning);
});

api.on("authenticated", function() {

    console.log("authenticated");
});