google/google-api-nodejs-client — pull request #304 by ryanseys (2014-10-10 18:52:13+00:00)
Title: Handle 5xx as errors

Fixes #293. @Alaneor, want to take an extra look?

mikeal/request does not return an err object on 5xx errors because they are not related to the socket. So instead, I check the response.statusCode of each response and return an error object if it's a 5xx. I also set the body of the message to null.