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

App crashes on 500 error #33

Open
hafeez1042 opened this issue Mar 22, 2016 · 5 comments
Open

App crashes on 500 error #33

hafeez1042 opened this issue Mar 22, 2016 · 5 comments

Comments

@hafeez1042
Copy link

App is crashing If API call returns with 500, And its working perfectly with redux-promise-middleware

@real-ashwin
Copy link

I see this too. App crashes on all errors. The crash happens a few seconds after the API returns during which time the browserTab is not responding.
Do we have to explicitly handle promise rejection?

@szahn
Copy link

szahn commented Mar 31, 2016

+1

@real-ashwin
Copy link

In my case the issue was that I was using jQuery to make the ajax calls. jQuery's deferred is not equal to es6 Promise. Fixed it by replacing redux-promise with redux-deferred.

@rkatic
Copy link

rkatic commented Jul 29, 2016

Did't try to reproduce, but I'm quite sure the reason this happens, is that error in jQuery.ajax is the jqXHR itself, which itself is a rejected PROMISE, for which this middleware will make dispatch recursively run until stack overflow.

A solution to escape the recursion, is to next(action) if action.error.

rkatic added a commit to rkatic/redux-promise that referenced this issue Jul 29, 2016
…self. Fixes redux-utilities#33.

Doing this with quick editing, without testing. Sorry, don't have much time now.
rkatic pushed a commit to rkatic/redux-promise that referenced this issue Jul 31, 2016
@rkatic
Copy link

rkatic commented Jul 31, 2016

Ok, I found some time to test it and added some tests.

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

4 participants