| Index: remoting/webapp/crd/js/crd_main.js | 
| diff --git a/remoting/webapp/crd/js/crd_main.js b/remoting/webapp/crd/js/crd_main.js | 
| index 2f7b03f755590e84ba44219f9b7611c21922189c..20ae60aa9f2594cd55429eaa0e9ba78ae202d95f 100644 | 
| --- a/remoting/webapp/crd/js/crd_main.js | 
| +++ b/remoting/webapp/crd/js/crd_main.js | 
| @@ -17,7 +17,8 @@ remoting.initHostlist_ = function() { | 
| document.getElementById('host-list-empty'), | 
| document.getElementById('host-list-error-message'), | 
| document.getElementById('host-list-refresh-failed-button'), | 
| -      document.getElementById('host-list-loading-indicator')); | 
| +      document.getElementById('host-list-loading-indicator'), | 
| +      remoting.showErrorMessage); | 
|  | 
| isHostModeSupported_().then( | 
| /** @param {Boolean} supported */ | 
| @@ -180,6 +181,23 @@ remoting.startDesktopRemotingForTesting = function() { | 
| } | 
| } | 
|  | 
| +/** | 
| + * @param {!remoting.Error} error The failure reason. | 
| + */ | 
| +remoting.showErrorMessage = function(error) { | 
| +  l10n.localizeElementFromTag( | 
| +      document.getElementById('token-refresh-error-message'), | 
| +      error.getTag()); | 
| +  var auth_failed = (error.hasTag(remoting.Error.Tag.AUTHENTICATION_FAILED)); | 
| +  if (auth_failed && base.isAppsV2()) { | 
| +    remoting.handleAuthFailureAndRelaunch(); | 
| +  } else { | 
| +    document.getElementById('token-refresh-auth-failed').hidden = !auth_failed; | 
| +    document.getElementById('token-refresh-other-error').hidden = auth_failed; | 
| +    remoting.setMode(remoting.AppMode.TOKEN_REFRESH_FAILED); | 
| +  } | 
| +}; | 
| + | 
|  | 
| remoting.startDesktopRemoting = function() { | 
| remoting.app = new remoting.Application(remoting.app_capabilities()); | 
|  |