Skip to content

Conversation

@DominicKramer
Copy link
Contributor

An attempt will be made to communicate with the API as soon as
the error reporting library is loaded so that the user will be
notified on application start if the error reporting library
cannot communicate with the API.

Without this change, the user will instead receive a warning
only when the error reporting library attempts to report its first
error.

An attempt will be made to communicate with the API as soon as
the error reporting library is loaded so that the user will be
notified on application start if the error reporting library
cannot communicate with the API.

Without this change, the user will instead receive a warning
only when the error reporting library attempts to report its first
error.
@DominicKramer DominicKramer requested a review from kjin April 24, 2017 18:48
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 24, 2017
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling acabafb on DominicKramer:feature/warn-if-cannot-access-api into 40abb0b on GoogleCloudPlatform:master.

Copy link
Contributor

@kjin kjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM w/ minor comments.

that._logger.warn([
'Unable to find credential information on instance. This library ' +
'will be unable to communicate with the Stackdriver API to save ' +
'errors. Message: ' + err.message

This comment was marked as spam.

This comment was marked as spam.

};
var config = new Configuration({ ignoreEnvironmentCheck: true }, logger);
new RequestHandler(config, logger);
assert.strictEqual(warnText, expectedWarn);

This comment was marked as spam.

This comment was marked as spam.

var that = this;
this.authClient.getToken(function(err, token) {
if (err) {
that._logger.warn([

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 5f7156b on DominicKramer:feature/warn-if-cannot-access-api into 40abb0b on GoogleCloudPlatform:master.

@stephenplusplus stephenplusplus merged commit 8037b2a into googleapis:master Apr 25, 2017
GautamSharda pushed a commit that referenced this pull request Jan 14, 2026
* error-reporting: Warn early if cannot access API

An attempt will be made to communicate with the API as soon as
the error reporting library is loaded so that the user will be
notified on application start if the error reporting library
cannot communicate with the API.

Without this change, the user will instead receive a warning
only when the error reporting library attempts to report its first
error.

* Add tests to verify successful communication

* Address GitHub comments
GautamSharda pushed a commit that referenced this pull request Jan 15, 2026
* error-reporting: Warn early if cannot access API

An attempt will be made to communicate with the API as soon as
the error reporting library is loaded so that the user will be
notified on application start if the error reporting library
cannot communicate with the API.

Without this change, the user will instead receive a warning
only when the error reporting library attempts to report its first
error.

* Add tests to verify successful communication

* Address GitHub comments
GautamSharda pushed a commit that referenced this pull request Feb 5, 2026
* error-reporting: Warn early if cannot access API

An attempt will be made to communicate with the API as soon as
the error reporting library is loaded so that the user will be
notified on application start if the error reporting library
cannot communicate with the API.

Without this change, the user will instead receive a warning
only when the error reporting library attempts to report its first
error.

* Add tests to verify successful communication

* Address GitHub comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: error-reporting cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants