Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error-reporting: Fix an issue where authorization would fail #2336

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions packages/error-reporting/src/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ var Configuration = function(givenConfig, logger) {
*/
this._key = null;
/**
* The _keyFilename property is meant to contain a path to a file containing
* The keyFilename property is meant to contain a path to a file containing
* user or service account credentials, which will be used in place of
* application default credentials. This property will remain null if no
* value for keyFilename is given in the runtime configuration.
Expand All @@ -113,9 +113,9 @@ var Configuration = function(givenConfig, logger) {
* @type {String|Null}
* @defaultvalue null
*/
this._keyFilename = null;
this.keyFilename = null;
/**
* The _credentials property is meant to contain an object representation of
* The credentials property is meant to contain an object representation of
* user or service account credentials, which will be used in place of
* application default credentials. This property will remain null if no
* value for credentials is given in the runtime configuration.
Expand All @@ -124,7 +124,7 @@ var Configuration = function(givenConfig, logger) {
* @type {Credentials|Null}
* @defaultvalue null
*/
this._credentials = null;
this.credentials = null;
/**
* The _serviceContext property is meant to contain the optional service
* context information which may be given in the runtime configuration. If
Expand Down Expand Up @@ -258,12 +258,12 @@ Configuration.prototype._gatherLocalConfiguration = function() {
throw new Error('config.key must be a string');
}
if (isString(this._givenConfiguration.keyFilename)) {
this._keyFilename = this._givenConfiguration.keyFilename;
this.keyFilename = this._givenConfiguration.keyFilename;
} else if (has(this._givenConfiguration, 'keyFilename')) {
throw new Error('config.keyFilename must be a string');
}
if (isObject(this._givenConfiguration.credentials)) {
this._credentials = this._givenConfiguration.credentials;
this.credentials = this._givenConfiguration.credentials;
} else if (has(this._givenConfiguration, 'credentials')) {
throw new Error('config.credentials must be a valid credentials object');
}
Expand Down Expand Up @@ -335,24 +335,24 @@ Configuration.prototype.getKey = function() {
return this._key;
};
/**
* Returns the _keyFilename property on the instance.
* Returns the keyFilename property on the instance.
* @memberof Configuration
* @public
* @function getKeyFilename
* @returns {String|Null} - returns the _keyFilename property
* @returns {String|Null} - returns the keyFilename property
*/
Configuration.prototype.getKeyFilename = function() {
return this._keyFilename;
return this.keyFilename;
};
/**
* Returns the _credentials property on the instance.
* Returns the credentials property on the instance.
* @memberof Configuration
* @public
* @function getCredentials
* @returns {Credentials|Null} - returns the _credentials property
* @returns {Credentials|Null} - returns the credentials property
*/
Configuration.prototype.getCredentials = function() {
return this._credentials;
return this.credentials;
};
/**
* Returns the _serviceContext property on the instance.
Expand Down