kevinohara80/nforce — pull request #22 by chrishic (2013-08-06 00:29:04+00:00)
Title: Refactor error handling when making SF REST API calls using the request module.

Sporadically, in my production code, I've seen cases where calls made with the request module return no `err` or `res` values in the callback (this happens when sockets get closed). This pull request tightens up the error handling code to protect against these circumstances, as well as some refactoring to eliminate code duplication.