Permalink
Browse files

fix(UnitOfWork): catch transaction rejections

  • Loading branch information...
RWOverdijk committed Mar 13, 2017
1 parent a3ae73b commit 893416db91b169945c1755fce50d6ba15c57e2e2
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/UnitOfWork.ts
@@ -732,14 +732,14 @@ export class UnitOfWork {
let storeName = store.getName();
if (!this.transactions[storeName]) {
this.transactions[storeName] = new Promise(resolve => {
this.transactions[storeName] = new Promise((resolve, reject) => {
let connection = store.getConnection(Store.ROLE_MASTER);
connection.transaction(transaction => {
this.transactions[storeName] = {connection: connection, transaction: transaction};
resolve(this.transactions[storeName]);
});
}).catch(error => reject(error));
});
}

0 comments on commit 893416d

Please sign in to comment.