karbassi / netatmo

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

Prevent type error when response of a request is empty (e.g. internet connection failure) #6

Closed danilowanner closed 9 years ago

danilowanner commented 9 years ago

This is a fix for the following issue: https://github.com/karbassi/netatmo/issues/4

This pull request also improves error events by emitting non-critical errors as a "warning"-event instead of an "error"-event which has a more appropriate default behavior (fails silently, without crashing the app). The error is also returned to callback function as first parameter (according to error-first paradigm; previously no callback was invoked).

karbassi commented 9 years ago

Looks great. Thanks for the hard work and reworking a few things! :+1:

danilowanner commented 9 years ago

Sure thing, glad I could help.