diff options
author | =Corey Hulen <corey@hulen.com> | 2016-02-26 09:49:29 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-02-26 09:49:29 -0800 |
commit | a0cc464c973fe0b2ca8aa1fa386656435bdbfbec (patch) | |
tree | 77646ea56732d30d87e975b9ccccae273f6a1915 /web/react/utils | |
parent | ce5ea641aafa269aad44d1d3dd31db30e8fc2b04 (diff) | |
download | chat-a0cc464c973fe0b2ca8aa1fa386656435bdbfbec.tar.gz chat-a0cc464c973fe0b2ca8aa1fa386656435bdbfbec.tar.bz2 chat-a0cc464c973fe0b2ca8aa1fa386656435bdbfbec.zip |
PLT-2030 fixing error handling
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/client.jsx | 13 |
1 files changed, 2 insertions, 11 deletions
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'; } |