summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorsimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-07 17:42:34 +0000
committersimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-07 17:42:34 +0000
commit6328c43fd93905dd316f2a3562eb3eed97fc2dd3 (patch)
tree90f36a46ea1e8a8778c5d3f5c4378894f7dee881 /remoting
parentcc563f0e83d20a0eb740fbb61361f5c615223756 (diff)
downloadchromium_src-6328c43fd93905dd316f2a3562eb3eed97fc2dd3.zip
chromium_src-6328c43fd93905dd316f2a3562eb3eed97fc2dd3.tar.gz
chromium_src-6328c43fd93905dd316f2a3562eb3eed97fc2dd3.tar.bz2
[Chromoting] Make the webapp handle 502 errors like 503 errors.
BUG=158845 Review URL: https://codereview.chromium.org/11362128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166463 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/webapp/client_screen.js2
-rw-r--r--remoting/webapp/host_list.js2
-rw-r--r--remoting/webapp/oauth2.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/remoting/webapp/client_screen.js b/remoting/webapp/client_screen.js
index 37f507d..f534e72 100644
--- a/remoting/webapp/client_screen.js
+++ b/remoting/webapp/client_screen.js
@@ -416,7 +416,7 @@ function parseServerResponse_(xhr) {
errorMsg = remoting.Error.INVALID_ACCESS_CODE;
} else if (xhr.status == 0) {
errorMsg = remoting.Error.NO_RESPONSE;
- } else if (xhr.status == 503) {
+ } else if (xhr.status == 502 || xhr.status == 503) {
errorMsg = remoting.Error.SERVICE_UNAVAILABLE;
} else {
console.error('The server responded: ' + xhr.responseText);
diff --git a/remoting/webapp/host_list.js b/remoting/webapp/host_list.js
index 1dd6c46..a596f81 100644
--- a/remoting/webapp/host_list.js
+++ b/remoting/webapp/host_list.js
@@ -168,7 +168,7 @@ remoting.HostList.prototype.parseHostListResponse_ = function(onDone, xhr) {
this.lastError_ = remoting.Error.NO_RESPONSE;
} else if (xhr.status == 401) {
this.lastError_ = remoting.Error.AUTHENTICATION_FAILED;
- } else if (xhr.status == 503) {
+ } else if (xhr.status == 502 || xhr.status == 503) {
this.lastError_ = remoting.Error.SERVICE_UNAVAILABLE;
} else {
this.lastError_ = remoting.Error.UNEXPECTED;
diff --git a/remoting/webapp/oauth2.js b/remoting/webapp/oauth2.js
index 3850ada..9956f5a 100644
--- a/remoting/webapp/oauth2.js
+++ b/remoting/webapp/oauth2.js
@@ -313,7 +313,7 @@ remoting.OAuth2.prototype.interpretUnexpectedXhrStatus_ = function(xhrStatus) {
// recover from an unexpected failure by signing in again.
/** @type {remoting.Error} */
var error = remoting.Error.AUTHENTICATION_FAILED;
- if (xhrStatus == 503) {
+ if (xhrStatus == 502 || xhrStatus == 503) {
error = remoting.Error.SERVICE_UNAVAILABLE;
} else if (xhrStatus == 0) {
error = remoting.Error.NETWORK_FAILURE;