constantcontact / ruby-sdk

Constant Contact Ruby SDK for v2 API
Other
17 stars 47 forks source link

before parsing to JSON we should check data exists #37

Closed kritik closed 9 years ago

kritik commented 9 years ago

We got ssl problem in ruby in one computer and RestClient returned Exception which responded to response but it was nil (what is logical).As JSON.parse cannot parse nil (not a json object) script failed on rescue and we got bad response message. Having this check helped to find a problem

kritik commented 9 years ago

Strange that 2.1 and 2.2 pass, but not 1.9. Seems to be travis problem

csciuto commented 9 years ago

That was rather odd...Travis was timing out! I re-ran the tests and they passed.

Thanks for the contribution!