Open hafeez1042 opened 8 years ago
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?
+1
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
.
Ok, I found some time to test it and added some tests.
App is crashing If API call returns with 500, And its working perfectly with redux-promise-middleware