nodejitsu/pkgcloud — pull request #190 by rosskukulinski (2013-10-23 22:59:38+00:00)
Title: Better handling of empty responses from Rackspace

We occasionally see empty responses (or perhaps empty body objects) from Rackspace -- especially for getFlavors and getImages (which we call pretty regularly) but the err object is null. Currently, this causes an uncaught exception in most of these functions because they don't handle this error.

I went through and updated most of the OpenStack 'get' functionality to properly handle this odd error condition.

Full disclosure:
* npm test passes, but I didn't implement test cases for the error conditions
* I've tested this branch on our app in development
* We haven't tested this branch in staging or production (yet)