diff --git a/machines/begin-transaction.js b/machines/begin-transaction.js index 102274e..11030b8 100644 --- a/machines/begin-transaction.js +++ b/machines/begin-transaction.js @@ -66,7 +66,7 @@ module.exports = { Pack.sendNativeQuery({ connection: inputs.connection, nativeQuery: 'BEGIN' - }).exec({ + }).switch({ error: function error(err) { return exits.error(err); }, diff --git a/machines/commit-transaction.js b/machines/commit-transaction.js index fffb563..b0be713 100644 --- a/machines/commit-transaction.js +++ b/machines/commit-transaction.js @@ -69,7 +69,7 @@ module.exports = { Pack.sendNativeQuery({ connection: inputs.connection, nativeQuery: 'COMMIT' - }).exec({ + }).switch({ error: function error(err) { return exits.error(err); }, diff --git a/machines/rollback-transaction.js b/machines/rollback-transaction.js index 301fa3b..e66cc09 100644 --- a/machines/rollback-transaction.js +++ b/machines/rollback-transaction.js @@ -67,7 +67,7 @@ module.exports = { Pack.sendNativeQuery({ connection: inputs.connection, nativeQuery: 'ROLLBACK' - }).exec({ + }).switch({ error: function error(err) { return exits.error(err); },