| Index: remoting/webapp/app_remoting/js/app_remoting.js
|
| diff --git a/remoting/webapp/app_remoting/js/app_remoting.js b/remoting/webapp/app_remoting/js/app_remoting.js
|
| index 3d3b58566dc50bdee4b5e19897d15abb322564af..b821be60bea94755137d1875606f9a3857fd71c0 100644
|
| --- a/remoting/webapp/app_remoting/js/app_remoting.js
|
| +++ b/remoting/webapp/app_remoting/js/app_remoting.js
|
| @@ -148,7 +148,8 @@ remoting.AppRemoting.prototype.start = function(connector, token) {
|
|
|
| connector.connectMe2App(host, fetchThirdPartyToken);
|
| } else if (response && response.status == 'pending') {
|
| - that.handleError(remoting.Error.SERVICE_UNAVAILABLE);
|
| + that.handleError(new remoting.Error(
|
| + remoting.Error.Tag.SERVICE_UNAVAILABLE));
|
| }
|
| } else {
|
| console.error('Invalid "runApplication" response from server.');
|
| @@ -156,15 +157,19 @@ remoting.AppRemoting.prototype.start = function(connector, token) {
|
| // been updated to properly report 'unknown' errors (rather than
|
| // reporting them as AUTHENTICATION_FAILED).
|
| if (xhr.status == 0) {
|
| - that.handleError(remoting.Error.NETWORK_FAILURE);
|
| + that.handleError(new remoting.Error(
|
| + remoting.Error.Tag.NETWORK_FAILURE));
|
| } else if (xhr.status == 401) {
|
| - that.handleError(remoting.Error.AUTHENTICATION_FAILED);
|
| + that.handleError(new remoting.Error(
|
| + remoting.Error.Tag.AUTHENTICATION_FAILED));
|
| } else if (xhr.status == 403) {
|
| - that.handleError(remoting.Error.APP_NOT_AUTHORIZED);
|
| + that.handleError(new remoting.Error(
|
| + remoting.Error.Tag.APP_NOT_AUTHORIZED));
|
| } else if (xhr.status == 502 || xhr.status == 503) {
|
| - that.handleError(remoting.Error.SERVICE_UNAVAILABLE);
|
| + that.handleError(new remoting.Error(
|
| + remoting.Error.Tag.SERVICE_UNAVAILABLE));
|
| } else {
|
| - that.handleError(remoting.Error.UNEXPECTED);
|
| + that.handleError(remoting.Error.unexpected());
|
| }
|
| }
|
| };
|
|
|