> For the complete documentation index, see [llms.txt](https://dexiejs.typogram.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dexiejs.typogram.co/transaction/transaction.on.abort.md).

# Transaction.on.abort

### Syntax

```javascript
trans.on("abort", function () {
    // Do stuff when transaction aborts
});
```

### Example

```javascript
db.transaction('rw', db.friends, function() {
    Dexie.currentTransaction.on('abort', function(){
        console.log('Transaction aborted');
    });
});
```
