Skip to content

Commit

Permalink
Catch fetchQuery errors in startQuery.
Browse files Browse the repository at this point in the history
Fixes #891

The error wasn't caught anywhere. Should anything be done with the error? For subscriptions it is handled via the store I believe.
  • Loading branch information
jamiter authored Nov 22, 2016
1 parent 87b4926 commit 72bca8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/QueryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,10 @@ export class QueryManager {
public startQuery(queryId: string, options: WatchQueryOptions, listener: QueryListener) {
this.addQueryListener(queryId, listener);

this.fetchQuery(queryId, options);
this.fetchQuery(queryId, options)
// `fetchQuery` returns a Promise. In case of a failure it should be caucht or else the
// console will show an `Uncaught (in promise)` message.
.catch((error: Error) => {});

return queryId;
}
Expand Down

0 comments on commit 72bca8e

Please sign in to comment.