Update to prevent status code 200 messages from being flagged as errors.

This commit is contained in:
Ryan Roth
2015-09-04 13:31:25 -04:00
parent c7faff5670
commit 1f848ac4f1

View File

@@ -73,7 +73,7 @@ DefaultTransporter.prototype.wrapCallback_ = function(opt_callback) {
body = JSON.parse(body);
} catch (err) { /* no op */ }
if (body && body.error && res.statusCode != 200) {
if (body && body.error && res.statusCode !== 200) {
if (typeof body.error === 'string') {
err = new Error(body.error);
err.code = res.statusCode;