summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-16 17:06:31 +0000
committersimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-16 17:06:31 +0000
commita1902dc972a495604e610579a9b19392d9e76423 (patch)
tree5e92d65adca3a71372db8a91353d5e886e179ef3
parent7b0af15616ff4bc73eae82fdb2db55f8a1a2c3ac (diff)
downloadchromium_src-a1902dc972a495604e610579a9b19392d9e76423.zip
chromium_src-a1902dc972a495604e610579a9b19392d9e76423.tar.gz
chromium_src-a1902dc972a495604e610579a9b19392d9e76423.tar.bz2
Show an appropriate message if the chromoting service returns a 503 error.
BUG=96779 TEST=none Review URL: http://codereview.chromium.org/8953005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114815 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--remoting/webapp/me2mom/_locales/en/messages.json4
-rw-r--r--remoting/webapp/me2mom/client_screen.js2
-rw-r--r--remoting/webapp/me2mom/host_list.js2
-rw-r--r--remoting/webapp/me2mom/remoting.js3
4 files changed, 10 insertions, 1 deletions
diff --git a/remoting/webapp/me2mom/_locales/en/messages.json b/remoting/webapp/me2mom/_locales/en/messages.json
index 3f9e16e..f75480f 100644
--- a/remoting/webapp/me2mom/_locales/en/messages.json
+++ b/remoting/webapp/me2mom/_locales/en/messages.json
@@ -103,6 +103,10 @@
"message": "The server failed to respond to the network request.",
"description": "Error displayed by the client if the server does not respond to a network request."
},
+ "ERROR_SERVICE_UNAVAILABLE": {
+ "message": "The service is temporarily unavailable. Please try again later.",
+ "description": "Error displayed when the service returns a 503 error. Such errors are usually temporary, and resolve themselves in about 30 seconds."
+ },
"ERROR_UNEXPECTED": {
"message": "An unexpected error occurred. Please report this problem to the developers.",
"description": "Error displayed in situations where things go wrong in ways not anticipated by the developers. There is typically no user-workaround to suggest, other than reporting the error so that we can investigate further."
diff --git a/remoting/webapp/me2mom/client_screen.js b/remoting/webapp/me2mom/client_screen.js
index 5a3a1bb..52a131a 100644
--- a/remoting/webapp/me2mom/client_screen.js
+++ b/remoting/webapp/me2mom/client_screen.js
@@ -373,6 +373,8 @@ function parseServerResponse_(xhr) {
errorMsg = remoting.Error.INVALID_ACCESS_CODE;
} else if (xhr.status == 0) {
errorMsg = remoting.Error.NO_RESPONSE;
+ } else if (xhr.status == 503) {
+ errorMsg = remoting.Error.SERVICE_UNAVAILABLE;
} else {
remoting.debug.log('The server responded: ' + xhr.responseText);
}
diff --git a/remoting/webapp/me2mom/host_list.js b/remoting/webapp/me2mom/host_list.js
index 55f288f..8539f28 100644
--- a/remoting/webapp/me2mom/host_list.js
+++ b/remoting/webapp/me2mom/host_list.js
@@ -127,6 +127,8 @@ remoting.HostList.prototype.parseHostListResponse_ = function(xhr, onDone) {
} else if (xhr.status >= 400 && xhr.status < 500) {
// For other errors, tell the user to re-authorize us.
this.lastError_ = remoting.Error.GENERIC;
+ } else if (xhr.status == 503) {
+ this.lastError_ = remoting.Error.SERVICE_UNAVAILABLE;
} else {
this.lastError_ = remoting.Error.UNEXPECTED;
}
diff --git a/remoting/webapp/me2mom/remoting.js b/remoting/webapp/me2mom/remoting.js
index 76e32cf..18bcedb 100644
--- a/remoting/webapp/me2mom/remoting.js
+++ b/remoting/webapp/me2mom/remoting.js
@@ -21,7 +21,8 @@ remoting.Error = {
INCOMPATIBLE_PROTOCOL: /*i18n-content*/'ERROR_INCOMPATIBLE_PROTOCOL',
BAD_PLUGIN_VERSION: /*i18n-content*/'ERROR_BAD_PLUGIN_VERSION',
GENERIC: /*i18n-content*/'ERROR_GENERIC',
- UNEXPECTED: /*i18n-content*/'ERROR_UNEXPECTED'
+ UNEXPECTED: /*i18n-content*/'ERROR_UNEXPECTED',
+ SERVICE_UNAVAILABLE: /*i18n-content*/'ERROR_SERVICE_UNAVAILABLE'
};
(function() {