Index: remoting/webapp/app_remoting/js/app_remoting_activity.js |
diff --git a/remoting/webapp/app_remoting/js/app_remoting_activity.js b/remoting/webapp/app_remoting/js/app_remoting_activity.js |
index 3685946ef08a53ce7e2dbca4c2477df1278ae859..9c12281a47b4c2712f0bc90fc05b05805f322cb4 100644 |
--- a/remoting/webapp/app_remoting/js/app_remoting_activity.js |
+++ b/remoting/webapp/app_remoting/js/app_remoting_activity.js |
@@ -138,7 +138,13 @@ remoting.AppRemotingActivity.prototype.onAppHostResponse_ = |
} |
} else { |
console.error('Invalid "runApplication" response from server.'); |
- this.onError(remoting.Error.fromHttpStatus(xhrResponse.status)); |
+ // The orchestrator returns 403 if the user is not whitelisted to run the |
+ // app, which gets translated to a generic error message, so pick something |
+ // a bit more user-friendly. |
+ var error = xhrResponse.status == 403 ? |
+ new remoting.Error(remoting.Error.Tag.APP_NOT_AUTHORIZED) : |
+ remoting.Error.fromHttpStatus(xhrResponse.status); |
+ this.onError(error); |
kelvinp
2015/04/24 22:14:37
need to merge with ToT to call onConnectionFailed(
|
} |
}; |
@@ -179,7 +185,7 @@ remoting.AppRemotingActivity.prototype.onError = function(error) { |
console.error('Connection failed: ' + error.toString()); |
remoting.LoadingWindow.close(); |
remoting.MessageWindow.showErrorMessage( |
- chrome.i18n.getMessage(/*i18n-content*/'CONNECTION_FAILED'), |
+ remoting.app.getApplicationName(), |
Jamie
2015/04/24 22:04:52
See point (b), above.
|
chrome.i18n.getMessage(error.getTag())); |
this.cleanup_(); |
}; |