error-reporting: Warn early if cannot access API#2252
Merged
stephenplusplus merged 3 commits intogoogleapis:masterfrom Apr 25, 2017
Merged
error-reporting: Warn early if cannot access API#2252stephenplusplus merged 3 commits intogoogleapis:masterfrom
stephenplusplus merged 3 commits intogoogleapis:masterfrom
Conversation
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.
kjin
approved these changes
Apr 24, 2017
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| }; | ||
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
matthewloring
suggested changes
Apr 24, 2017
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
matthewloring
approved these changes
Apr 24, 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
4 tasks
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
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.