|
|
|
@ -89,7 +89,7 @@ this.FxAccountsProfileClient.prototype = {
|
|
|
|
|
try { |
|
|
|
|
return (yield this._rawRequest(path, method, token)); |
|
|
|
|
} catch (ex) { |
|
|
|
|
if (!ex instanceof FxAccountsProfileClientError || ex.code != 401) { |
|
|
|
|
if (!(ex instanceof FxAccountsProfileClientError) || ex.code != 401) { |
|
|
|
|
throw ex; |
|
|
|
|
} |
|
|
|
|
// If this object was instantiated with a token then we don't refresh it.
|
|
|
|
@ -105,7 +105,7 @@ this.FxAccountsProfileClient.prototype = {
|
|
|
|
|
try { |
|
|
|
|
return (yield this._rawRequest(path, method, token)); |
|
|
|
|
} catch (ex) { |
|
|
|
|
if (!ex instanceof FxAccountsProfileClientError || ex.code != 401) { |
|
|
|
|
if (!(ex instanceof FxAccountsProfileClientError) || ex.code != 401) { |
|
|
|
|
throw ex; |
|
|
|
|
} |
|
|
|
|
log.info("Retry fetching the profile still returned a 401 - revoking our token and failing"); |
|
|
|
|