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

Errors are not accessible in the Redux store #47

Open
arnaudcosson opened this issue Sep 24, 2018 · 3 comments
Open

Errors are not accessible in the Redux store #47

arnaudcosson opened this issue Sep 24, 2018 · 3 comments

Comments

@arnaudcosson
Copy link

When authentification failed, errors are not accessible (or I didn't figure how) in the Redux Store.
The action "redux-token-auth/SIGNIN_REQUEST_FAILED" has no "errors" attribute so I can't inform the user why it fails

redux-token-auth-no-error

I think it could be great to have errors from the server answer accessible in the frontend
redux-token-auth-no-error-response

@matyi
Copy link

matyi commented Oct 17, 2018

@arnaudcosson it's an axios response so you can access the response object on the .response property of the error object:

signInUser({ email, password })
  .then(...)
  .catch(err => {
    console.log(err.response.data);
  });

@arnaudcosson
Copy link
Author

Thanks for your answer. I will try this quickly.

@Luiyit
Copy link

Luiyit commented Jun 13, 2019

Thanks!

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