aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/GlobalErrorStore.js
diff options
context:
space:
mode:
authorLibravatar Amine Mouafik <amine@mouafik.fr>2019-07-01 13:39:55 +0700
committerLibravatar Amine Mouafik <amine@mouafik.fr>2019-07-01 13:39:55 +0700
commitb43b265e8d383eb9b6f0a31f096f52ad9f7171c2 (patch)
tree6b258426b849520ae29d92a44fe2aa7c608ad80b /src/stores/GlobalErrorStore.js
parentAdd features list to README (diff)
parentRevert: fix spellchecker (diff)
downloadferdium-app-b43b265e8d383eb9b6f0a31f096f52ad9f7171c2.tar.gz
ferdium-app-b43b265e8d383eb9b6f0a31f096f52ad9f7171c2.tar.zst
ferdium-app-b43b265e8d383eb9b6f0a31f096f52ad9f7171c2.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/stores/GlobalErrorStore.js')
-rw-r--r--src/stores/GlobalErrorStore.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/stores/GlobalErrorStore.js b/src/stores/GlobalErrorStore.js
index 90bf751c3..7a85c2daa 100644
--- a/src/stores/GlobalErrorStore.js
+++ b/src/stores/GlobalErrorStore.js
@@ -18,8 +18,11 @@ export default class GlobalErrorStore extends Store {
18 this.error = request.error; 18 this.error = request.error;
19 19
20 if (request.error.json) { 20 if (request.error.json) {
21 this.response = await request.error.json(); 21 try {
22 22 this.response = await request.error.json();
23 } catch (error) {
24 this.response = {};
25 }
23 if (this.error.status === 401) { 26 if (this.error.status === 401) {
24 this.actions.user.logout({ serverLogout: true }); 27 this.actions.user.logout({ serverLogout: true });
25 } 28 }