Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Wrong usage of @defer.reject() #65

Open
devgru opened this issue Jun 27, 2016 · 6 comments
Open

Wrong usage of @defer.reject() #65

devgru opened this issue Jun 27, 2016 · 6 comments

Comments

@devgru
Copy link

devgru commented Jun 27, 2016

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.

@bramski
Copy link
Owner

bramski commented Jun 29, 2016

What form of rejection would be preferred?

@devgru
Copy link
Author

devgru commented Jul 3, 2016

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})

@devgru
Copy link
Author

devgru commented Jul 11, 2016

@bramski will it be useful if I write PR with this change?

@bramski
Copy link
Owner

bramski commented Jul 11, 2016

Yes for sure.
On Jul 11, 2016 3:13 AM, "Dmitriy Semyushkin" notifications@github.com
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
#65 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAZvlYKjxhqpR-PjdN3UUA3lF8317EIuks5qUhdNgaJpZM4I-4Sj
.

@devgru
Copy link
Author

devgru commented Jul 16, 2016

Here you are:
#66

@bramski
Copy link
Owner

bramski commented Oct 26, 2016

Merged.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants