Skip to content

Commit

Permalink
fix(explain): fix 'unhandled' promise rejection (#1442)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Feb 17, 2021
1 parent f539629 commit 716efb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/postgraphile/withPostGraphileContext.ts
Expand Up @@ -538,7 +538,9 @@ export function debugPgClient(pgClient: PoolClient, allowExplain = false): PoolC
query,
result: pgClient[$$pgClientOrigQuery]
.call(this, explain, values)
.then((data: any) => data.rows),
.then((data: any) => data.rows)
// swallow errors during explain
.catch(() => null),
});
}
}
Expand Down

0 comments on commit 716efb0

Please sign in to comment.