diff options
author | theia | 2022-08-01 15:39:00 -0400 |
---|---|---|
committer | theia | 2022-08-01 15:39:00 -0400 |
commit | f8adb58097591481873afac85e7ba011b26adfb0 (patch) | |
tree | d98a6c6b836f6c7f0f82ca459514faa4b78b47a9 | |
parent | 38ca42741bd3e27f0954bb11e81729dd8f7806e9 (diff) |
if authorization error, log out
-rw-r--r-- | src/socket.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/socket.js b/src/socket.js index 59834d8..06cd7c6 100644 --- a/src/socket.js +++ b/src/socket.js @@ -77,7 +77,7 @@ export default class { const data = await dataPromise delete data.messageID - if (data.type == 'error' ) { + if (data.type == 'error') { throw data } else { return data @@ -118,6 +118,11 @@ export default class { } } } + } else if (data.type == 'error') { + if (data.reason == 'authorization') { + this.logOut() + } + throw data } } |