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