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

I upgraded to 3.0.0 from 2.4.0 started getting "Uncaught (in promise)" log errors. #74

Closed
rluiten opened this issue May 17, 2016 · 2 comments

Comments

@rluiten
Copy link

rluiten commented May 17, 2016

This it not a bug as a suggestion for updated documentation or maybe a change to library that might lower the bar to users of library in some cases, and produce less surprise for some people.

Possibly my code is naive and everyone generally figures this out in minutes, unlike me who took way over an hour... :) In my case I dispatch an action with a promise for an API request, and deal with the Fulfilled/Rejected cases in my reducer so I had no promise chaining on the action dispatcher creation.

It may be good idea that you return your new promise with no catch handler and require users to do so wherever they dispatch actions (I have no strong opinion here). If you don't have a catch handler then "Uncaught (in promise)" to be logged to console (at least they do in Chrome with with the es6 promise shims I have tried).

I think a bit of documentation about ensuring that you catch() the result of dispatching an action would catch these log errors for people would help many I think. Maybe there is a way to default the library to not require in some case ?

@pburtchaell
Copy link
Owner

I think your issue is related to #75. If you are curious, I explain in that issue why the middleware does not catch errors. You are right though, the documentation should explain this and give some examples. I've taken note and will update the documentation soon with some information.

@rluiten
Copy link
Author

rluiten commented May 31, 2016

Cool, cheers and thanks for a nice little add on to redux.

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

2 participants