| Index: remoting/webapp/crd/js/oauth2_api.js
|
| diff --git a/remoting/webapp/crd/js/oauth2_api.js b/remoting/webapp/crd/js/oauth2_api.js
|
| index 2bc55f5391d18b5a52eb21c24e726e2c00790510..fe31e2f34d7920982a487776bae242adb961da61 100644
|
| --- a/remoting/webapp/crd/js/oauth2_api.js
|
| +++ b/remoting/webapp/crd/js/oauth2_api.js
|
| @@ -79,9 +79,8 @@ remoting.OAuth2Api.prototype.refreshAccessToken = function(
|
| // TODO(jamiewalch): Fix this once we're no longer using the trampoline.
|
| var tokens = JSON.parse(xhr.responseText);
|
| onDone(tokens['access_token'], tokens['expires_in']);
|
| - } catch (err) {
|
| - console.error('Invalid "token" response from server:',
|
| - /** @type {*} */ (err));
|
| + } catch (/** @type {*} */ err) {
|
| + console.error('Invalid "token" response from server:', err);
|
| onError(remoting.Error.UNEXPECTED);
|
| }
|
| } else {
|
| @@ -127,9 +126,8 @@ remoting.OAuth2Api.prototype.exchangeCodeForTokens = function(
|
| var tokens = JSON.parse(xhr.responseText);
|
| onDone(tokens['refresh_token'],
|
| tokens['access_token'], tokens['expires_in']);
|
| - } catch (err) {
|
| - console.error('Invalid "token" response from server:',
|
| - /** @type {*} */ (err));
|
| + } catch (/** @type {*} */ err) {
|
| + console.error('Invalid "token" response from server:', err);
|
| onError(remoting.Error.UNEXPECTED);
|
| }
|
| } else {
|
| @@ -166,9 +164,8 @@ remoting.OAuth2Api.prototype.getEmail = function(onDone, onError, token) {
|
| try {
|
| var result = JSON.parse(xhr.responseText);
|
| onDone(result['email']);
|
| - } catch (err) {
|
| - console.error('Invalid "userinfo" response from server:',
|
| - /** @type {*} */ (err));
|
| + } catch (/** @type {*} */ err) {
|
| + console.error('Invalid "userinfo" response from server:', err);
|
| onError(remoting.Error.UNEXPECTED);
|
| }
|
| } else {
|
| @@ -199,9 +196,8 @@ remoting.OAuth2Api.prototype.getUserInfo = function(onDone, onError, token) {
|
| try {
|
| var result = JSON.parse(xhr.responseText);
|
| onDone(result['email'], result['name']);
|
| - } catch (err) {
|
| - console.error('Invalid "userinfo" response from server:',
|
| - /** @type {*} */ (err));
|
| + } catch (/** @type {*} */ err) {
|
| + console.error('Invalid "userinfo" response from server:', err);
|
| onError(remoting.Error.UNEXPECTED);
|
| }
|
| } else {
|
|
|