Skip to content

Commit

Permalink
Merge pull request #1168 from wubzz/bugfix/proxy_query-error_event_in…
Browse files Browse the repository at this point in the history
…_transaction

Proxy query-error event in transaction
  • Loading branch information
elhigu committed Jan 30, 2016
2 parents 460b6d5 + decd428 commit 064d416
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ function makeTxClient(trx, client, connection) {
client.emit('query', arg)
})

trxClient.on('query-error', function(err, obj) {
trx.emit('query-error', err, obj)
client.emit('query-error', err, obj)
})

var _query = trxClient.query;
trxClient.query = function(conn, obj) {
var completed = trx.isCompleted()
Expand Down

0 comments on commit 064d416

Please sign in to comment.