Skip to content

Commit

Permalink
Catch getSDL errors.
Browse files Browse the repository at this point in the history
Closes #1039.
  • Loading branch information
imolorhe committed Nov 10, 2019
1 parent fc796ff commit c6fe706
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/effects/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ export class QueryEffects {
if (schema) {
this.gqlService.getSDL(schema).then(sdl => {
return this.store.dispatch(new gqlSchemaActions.SetSchemaSDLAction(action.windowId, { sdl }))
})
.catch(err => {
this.notifyService.error('Could not set schema SDL');
});
}

Expand Down Expand Up @@ -638,6 +641,9 @@ export class QueryEffects {
downloadData(sdl, 'sdl', { fileType: 'gql' });
}
})
.catch(err => {
this.notifyService.error('Could not export SDL. Your schema might be invalid.');
});
}
return observableEmpty();
}),
Expand Down

0 comments on commit c6fe706

Please sign in to comment.