From a0cc464c973fe0b2ca8aa1fa386656435bdbfbec Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Fri, 26 Feb 2016 09:49:29 -0800 Subject: PLT-2030 fixing error handling --- web/react/utils/client.jsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index 81bdb7293..2d0377e72 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -28,16 +28,7 @@ function handleError(methodName, xhr, status, err) { msg = 'error in ' + methodName + ' status=' + status + ' statusCode=' + xhr.status + ' err=' + err; if (xhr.status === 0) { - let errorCount = 1; - const oldError = ErrorStore.getLastError(); - let connectError = 'There appears to be a problem with your internet connection'; - - if (oldError && oldError.connErrorCount) { - errorCount += oldError.connErrorCount; - connectError = 'Please check connection, Mattermost unreachable. If issue persists, ask administrator to check WebSocket port.'; - } - - e = {message: connectError, connErrorCount: errorCount}; + e = {message: 'There appears to be a problem with your internet connection'}; } else { e = {message: 'We received an unexpected status code from the server (' + xhr.status + ')'}; } @@ -279,7 +270,7 @@ export function logout() { var currentTeamUrl = TeamStore.getCurrentTeamUrl(); BrowserStore.signalLogout(); BrowserStore.clear(); - ErrorStore.storeLastError(null); + ErrorStore.clearLastError(); window.location.href = currentTeamUrl + '/logout'; } -- cgit v1.2.3-1-g7c22