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));
|
||||||
|
if (error.code === 'access-denied') {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
store.dispatch({ type: ACCESS_KEY_ERROR, data: true }),
|
store.dispatch({ type: ACCESS_KEY_ERROR, data: true }),
|
||||||
]).then(() => {
|
]).then(() => {
|
||||||
replaceState('/login');
|
replaceState('/login');
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
alert(JSON.stringify(error));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user