Skip to content

Commit 07cae00

Browse files
committed
Fix an issue where authorization would fail
The `keyFilename` and `credentials` values specified in the configuration to the error-reporting library were not being used to communicate through the API. This would cause communication through the error-reporting API to fail.
1 parent 0ef2737 commit 07cae00

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

packages/error-reporting/src/configuration.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ var Configuration = function(givenConfig, logger) {
104104
*/
105105
this._key = null;
106106
/**
107-
* The _keyFilename property is meant to contain a path to a file containing
107+
* The keyFilename property is meant to contain a path to a file containing
108108
* user or service account credentials, which will be used in place of
109109
* application default credentials. This property will remain null if no
110110
* value for keyFilename is given in the runtime configuration.
@@ -113,9 +113,9 @@ var Configuration = function(givenConfig, logger) {
113113
* @type {String|Null}
114114
* @defaultvalue null
115115
*/
116-
this._keyFilename = null;
116+
this.keyFilename = null;
117117
/**
118-
* The _credentials property is meant to contain an object representation of
118+
* The credentials property is meant to contain an object representation of
119119
* user or service account credentials, which will be used in place of
120120
* application default credentials. This property will remain null if no
121121
* value for credentials is given in the runtime configuration.
@@ -124,7 +124,7 @@ var Configuration = function(givenConfig, logger) {
124124
* @type {Credentials|Null}
125125
* @defaultvalue null
126126
*/
127-
this._credentials = null;
127+
this.credentials = null;
128128
/**
129129
* The _serviceContext property is meant to contain the optional service
130130
* context information which may be given in the runtime configuration. If
@@ -258,12 +258,12 @@ Configuration.prototype._gatherLocalConfiguration = function() {
258258
throw new Error('config.key must be a string');
259259
}
260260
if (isString(this._givenConfiguration.keyFilename)) {
261-
this._keyFilename = this._givenConfiguration.keyFilename;
261+
this.keyFilename = this._givenConfiguration.keyFilename;
262262
} else if (has(this._givenConfiguration, 'keyFilename')) {
263263
throw new Error('config.keyFilename must be a string');
264264
}
265265
if (isObject(this._givenConfiguration.credentials)) {
266-
this._credentials = this._givenConfiguration.credentials;
266+
this.credentials = this._givenConfiguration.credentials;
267267
} else if (has(this._givenConfiguration, 'credentials')) {
268268
throw new Error('config.credentials must be a valid credentials object');
269269
}
@@ -335,24 +335,24 @@ Configuration.prototype.getKey = function() {
335335
return this._key;
336336
};
337337
/**
338-
* Returns the _keyFilename property on the instance.
338+
* Returns the keyFilename property on the instance.
339339
* @memberof Configuration
340340
* @public
341341
* @function getKeyFilename
342-
* @returns {String|Null} - returns the _keyFilename property
342+
* @returns {String|Null} - returns the keyFilename property
343343
*/
344344
Configuration.prototype.getKeyFilename = function() {
345-
return this._keyFilename;
345+
return this.keyFilename;
346346
};
347347
/**
348-
* Returns the _credentials property on the instance.
348+
* Returns the credentials property on the instance.
349349
* @memberof Configuration
350350
* @public
351351
* @function getCredentials
352-
* @returns {Credentials|Null} - returns the _credentials property
352+
* @returns {Credentials|Null} - returns the credentials property
353353
*/
354354
Configuration.prototype.getCredentials = function() {
355-
return this._credentials;
355+
return this.credentials;
356356
};
357357
/**
358358
* Returns the _serviceContext property on the instance.

0 commit comments

Comments
 (0)