GoogleCloudPlatform/gcloud-node — pull request #203 by stephenplusplus (2014-09-10 23:22:14+00:00)
Title: common: handle unknown api errors.

When I was playing around with my awesome sillycloud app ([source](https://github.com/stephenplusplus/sillycloud), [demo](http://107.178.210.205:8080/#/)), I ran into an issue where I had to parse an error string to get a useful status code: https://github.com/stephenplusplus/sillycloud/blob/master/actions.js#L36

The error I was getting was because I was using the wrong JSON key file, so what was actually failing wasn't the json datastore api, but the googleapis.com datastore request from Transaction#makeReq. I'm probably telling you what you already know, but the error response format from that host doesn't match the nice format we get from a cloud service json API request.

While we can't provide a very detailed error from that failed request, the end user should at least have a consistent format to expect from us, so I made these, and any other non-200s error cases an `ApiError` instance.

:+1: or :-1: ?