mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
parent
258885ad4d
commit
a49188a606
@ -194,12 +194,16 @@ const dataRouter = (connect, store, composeOnEnterHooks) => {
|
||||
},
|
||||
error => {
|
||||
console.error(JSON.stringify(error));
|
||||
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