Skip to content

Commit

Permalink
Add stack trace to transaction error.
Browse files Browse the repository at this point in the history
  • Loading branch information
piljung89 committed Jun 8, 2020
1 parent 2b22d2e commit 8f65043
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ function BASE({
}
},
async TRANSACTION() {
const stack = Error('Transaction start stacktrace');
try {
const client = await get_connection(pool);
const client_query = query_fn(client);
Expand All @@ -501,7 +502,7 @@ function BASE({
ASSOCIATE1 = pipe(ASSOCIATE, first);
await baseTransactionQuery(QUERY, QUERY1);
client.on('error', err => {
transactionErrorHandler(err, client, transaction_querys);
transactionErrorHandler(err, client, transaction_querys, stack);
});
return {
client,
Expand Down

0 comments on commit 8f65043

Please sign in to comment.