mirror of
https://github.com/HackPlan/google-auth-library-nodejs.git
synced 2026-01-13 16:52:26 +08:00
Update to prevent status code 200 messages from being flagged as errors.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user