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

Handling errors like 'unauthorized' globally #84

Closed
laxplaer opened this issue Jun 13, 2016 · 4 comments
Closed

Handling errors like 'unauthorized' globally #84

laxplaer opened this issue Jun 13, 2016 · 4 comments

Comments

@laxplaer
Copy link

Hi, thank you for a great plugin. I was wondering if there is a nice way how to handle errors globally. For example if the cookie expiry I would love to see some global handling of unauthorised request in one spot. Event 'actionFail' seems too manual to put everywhere.

@wvengen
Copy link
Contributor

wvengen commented Jun 13, 2016

You might find #78 a useful read, I'm currently using a redux middleware to call an action on error, which shows an error notification (using the state).

@wvengen
Copy link
Contributor

wvengen commented Jun 13, 2016

If you want to handle a specific http status differently, that's probably best done in a customized fetch adapter (e.g. like this).

@lexich
Copy link
Owner

lexich commented Jun 13, 2016

@wvengen +1 good work.

@laxplaer
Copy link
Author

Thank you for the answers.. I have implemented something similar like @wvengen was mentioning.. Tha actually work better in my scenario..

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