summaryrefslogtreecommitdiff
path: root/src/socket.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket.js')
-rw-r--r--src/socket.js7
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
}
}