angular-indexedDB
angular-indexedDB copied to clipboard
Wrong usage of @defer.reject()
Here we call @defer.reject()
with two arguments:
https://github.com/bramski/angular-indexedDB/blob/master/src/angular-indexed-db.coffee#L161-L171
The second argument of reject
method is ignored, so actual error is lost and we just get "Transaction Error" string in promise.
What form of rejection would be preferred?
IMHO actual error
is enough.
Maybe it's a good idea to reject with object, like this:
@defer.reject({title: "Transaction Aborted", error: error})
@defer.reject({title: "Transaction Error", error: error})
@bramski will it be useful if I write PR with this change?
Yes for sure. On Jul 11, 2016 3:13 AM, "Dmitriy Semyushkin" [email protected] wrote:
@bramski https://github.com/bramski will it be useful if I write PR with this change?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bramski/angular-indexedDB/issues/65#issuecomment-231695215, or mute the thread https://github.com/notifications/unsubscribe/AAZvlYKjxhqpR-PjdN3UUA3lF8317EIuks5qUhdNgaJpZM4I-4Sj .
Here you are: https://github.com/bramski/angular-indexedDB/pull/66
Merged.