You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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.
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.
Activity
real-ashwin commentedon Mar 23, 2016
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 commentedon Mar 31, 2016
+1
real-ashwin commentedon Mar 31, 2016
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 commentedon 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 makedispatch
recursively run until stack overflow.A solution to escape the recursion, is to
next(action)
ifaction.error
.Avoid infinite dispatching if error is a promise that rejects with it…
Add tests for redux-utilities#33.
rkatic commentedon Jul 31, 2016
Ok, I found some time to test it and added some tests.