client/src/sagas/networkSaga.js
changeset 137 279e1dffa213
parent 134 be36eed5e6e0
child 140 94d1e40f7954
--- a/client/src/sagas/networkSaga.js	Thu Aug 03 19:12:25 2017 +0200
+++ b/client/src/sagas/networkSaga.js	Thu Aug 03 23:04:33 2017 +0200
@@ -46,12 +46,13 @@
   } catch (error) {
     yield put(setOnlineStatus(false));
     //TODO: This is ugly...
-    if ((error.non_field_errors &&
-      error.non_field_errors &&
-      error.non_field_errors.length &&
-      error.non_field_errors.length > 0 &&
-      ( error.non_field_errors[0] === 'Signature has expired.' ||
-        error.non_field_errors[0] === 'Refresh has expired.' )) ||
+    const data = error.data;
+    if ((data.non_field_errors &&
+      data.non_field_errors &&
+      data.non_field_errors.length &&
+      data.non_field_errors.length > 0 &&
+      ( data.non_field_errors[0] === 'Signature has expired.' ||
+        data.non_field_errors[0] === 'Refresh has expired.' )) ||
       (error.detail && (
         error.detail === 'Signature has expired.' ||
         error.detail=== 'Refresh has expired.'