ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 206 forks source link

Wrap response handling in a try/catch to better handle errors. #10

Closed hamidp closed 12 years ago

hamidp commented 12 years ago

I am very paranoid so this wraps the response handling in a try/catch -- just in case there is a 200 response with non-json data, or if the data format changes.