Skip to content

Commit

Permalink
Revert "error msg instead if the api key is invalid"
Browse files Browse the repository at this point in the history
This reverts commit 689a233.
  • Loading branch information
kjin committed Aug 31, 2017
1 parent 689a233 commit 6343f77
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion packages/error-reporting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ If a key is provided, the module will not attempt to authenticate using the meth

We recommend storing the API key in a file rather than hard-coding it into your application's source code.
**Note:** The Error Reporting instance will check if the provided API key is invalid shortly after it is instantiated. If the key is invalid, an error-level message will be logged.
**Note:** If the API key provided is invalid, an error will be logged the first time the Error Reporting instance attempts to report an error. To ensure that the API key is valid, you may want to attempt to trigger an error shortly after deploying your app.
## Configuration
Expand Down
13 changes: 0 additions & 13 deletions packages/error-reporting/src/google-apis/auth-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,6 @@ class RequestHandler extends common.Service {
}
});
} else {
this.request({
uri: 'events:report',
qs: RequestHandler.manufactureQueryString(this._config.getKey()),
method: 'POST',
json: {}
}, (err, body, response) => {
if (err && err.message !== 'Message cannot be empty.') {
this._logger.error([
'Encountered an error while attempting to validate the provided',
'API key'
].join(' '), err);
}
});
that._logger.info('API key provided; skipping OAuth2 token request.');
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function verifyReportedMessage(config, errToReturn, expectedLogs) {
cb(errToReturn);
}
};
this.request = function() {};
}
}

Expand Down

0 comments on commit 6343f77

Please sign in to comment.