medikoo/deferred

support for .fail()

PSeitz opened this issue · 3 comments

a separate callback with .fail() would be cleaner instead a second parameter within done to catch rejected promises

I understand you mean something like catch() but as counterpart for done().

There are definitely use cases for that. Is there any other library that implements fail()? I want to be sure it's really good name for that

Jquery uses this pattern, I think it's a proper name for a failure.
http://api.jquery.com/deferred.fail/

When we talk about promise implementations, jQuery is not perfect example to rely on, but I agree it's convincing argument in favor of name fail .

I think we'll do that, just give me 1-2 days, to settle with that idea.