mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
parent
258885ad4d
commit
a49188a606
@ -194,12 +194,16 @@ const dataRouter = (connect, store, composeOnEnterHooks) => {
|
|||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.error(JSON.stringify(error));
|
console.error(JSON.stringify(error));
|
||||||
Promise.all([
|
if (error.code === 'access-denied') {
|
||||||
store.dispatch({ type: ACCESS_KEY_ERROR, data: true }),
|
Promise.all([
|
||||||
]).then(() => {
|
store.dispatch({ type: ACCESS_KEY_ERROR, data: true }),
|
||||||
replaceState('/login');
|
]).then(() => {
|
||||||
cb();
|
replaceState('/login');
|
||||||
});
|
cb();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
alert(JSON.stringify(error));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user