Skip to content

Commit

Permalink
Catch fetchQuery promise errors in startQuery.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michiel ter Reehorst committed Nov 23, 2016
1 parent 87b4926 commit 12901e0
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. Ignore the error for now.
.catch((error: Error) => undefined);

return queryId;
}
Expand Down

0 comments on commit 12901e0

Please sign in to comment.