Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

PromiseProxy calling success handler with a rejected promise #15694

Closed
deepan83 opened this issue Oct 2, 2017 · 4 comments
Closed

PromiseProxy calling success handler with a rejected promise #15694

deepan83 opened this issue Oct 2, 2017 · 4 comments

Comments

@deepan83
Copy link
Contributor

deepan83 commented Oct 2, 2017

I've noticed that in Ember 2.15, the PromiseProxy now calls the success handler of the promise with a rejected promise setting. Its ok in 2.14.x and this is causing a lot of issues in our apps.

App.ApplicationController = Ember.Controller.extend({
  init() {
    let ObjectPromiseProxy = Ember.ObjectProxy.extend(Ember.PromiseProxyMixin);

    ObjectPromiseProxy
      .create({promise: Ember.RSVP.reject()})
      .then(() => {
        alert('Unexpected');
       })
       .catch(() => {
         alert('Expected');
       })
    
   }
});

https://jsbin.com/vejosugiso/edit?html,js,output

@bekzod
Copy link
Contributor

bekzod commented Oct 3, 2017

can confirm fixed in rsvp 4.0.2 tildeio/rsvp.js#501
only ember 2.15 affected

@rwjblue
Copy link
Member

rwjblue commented Oct 3, 2017

Fix was just landed in #15685, and will be backported for 2.15.2.

@rwjblue rwjblue closed this as completed Oct 3, 2017
@bekzod
Copy link
Contributor

bekzod commented Oct 10, 2017

@rwjblue isn't this forgotten to be released with 2.15.3 :P ?

@deepan83
Copy link
Contributor Author

deepan83 commented Oct 25, 2017

Still seems to be an issue with 2.16.x @rwjblue

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

No branches or pull requests

3 participants