Bug 1573828 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

As part of Bug 1542181 we added in the transaction wrapper defined in IndexedDB.jsm an onabort handler which rejects `transaction.error`.

Based on the discussion from the kinto PR that is going to apply a similar change to kinto.js (https://github.com/Kinto/kinto.js/pull/1044) I took a look to the error rejected when a transaction is aborted because of a quota exceeded issues and when the transaction is aborted using the `transaction.abort()` method and it seems that:

- when the quota exceeded issue is triggered ([as described in this phabricator comment](https://phabricator.services.mozilla.com/D36514#1092117)), transaction.onabort is being called as expected and transaction.error is QuotaExceededError as expected

- when `transaction.abort()` is explicitly called, transaction.onabort is being called as expected but `transaction.error` is not defined (nor is evt.target.error from what I saw)

We should look into this and ensure that on an aborted transaction the transaction wrapper is going to always reject `promiseComplete` with an error object.

neeinfo :asuth to double-check in which conditions the transaction.error is not defined for an aborted transaction and when it is supposed to be defined
As part of Bug 1542181 we added in the transaction wrapper defined in IndexedDB.jsm an onabort handler which rejects `transaction.error`.

Based on the discussion from the kinto PR that is going to apply a similar change to kinto.js (https://github.com/Kinto/kinto.js/pull/1044) I took a look to the error rejected when a transaction is aborted because of a quota exceeded issues and when the transaction is aborted using the `transaction.abort()` method and it seems that:

- when the quota exceeded issue is triggered ([as described in this phabricator comment](https://phabricator.services.mozilla.com/D36514#1092117)), transaction.onabort is being called as expected and transaction.error is QuotaExceededError as expected

- when `transaction.abort()` is explicitly called, transaction.onabort is being called as expected but `transaction.error` is not defined (nor is evt.target.error from what I saw)

We should look into this and ensure that on an aborted transaction the transaction wrapper is going to always reject `promiseComplete` with an error object.

needinfo :asuth to double-check in which conditions the transaction.error is not defined for an aborted transaction and when it is supposed to be defined

Back to Bug 1573828 Comment 0