fix alert in cli mode without accesskey (close #536) (#588)

This commit is contained in:
Arash Khazaei 2018-10-09 09:55:10 +03:30 committed by Shahidh K Muhammed
parent 64286f69ed
commit dbdd79a987

View File

@ -33,7 +33,13 @@ const routes = store => {
},
r => {
if (r.code === 'data_api_error') {
alert('Hasura CLI: ' + r.message);
if (globals.accessKey) {
alert('Hasura CLI: ' + r.message);
} else {
alert(
'Looks like CLI is not configured with the access key. Please configure and try again'
);
}
} else {
alert(
'Not able to reach the graphql server. Check if hasura console server is running or if graphql server is running and try again'