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

Problems with responses #124

Open
finikm opened this issue May 17, 2016 · 2 comments
Open

Problems with responses #124

finikm opened this issue May 17, 2016 · 2 comments

Comments

@finikm
Copy link

finikm commented May 17, 2016

The login API I try to use returns a 400 response when there's an error, with the error message in the body of the response:

{error: {email: "Need Email or Username"}}

If I use Fetch API, I can do a check for a response.ok, and display the error message to the user. However, if I use this.auth.login, the 400 response is returned to the catch block, without a way for me to get that body.

Is it a bug or an intended behaviour? If it's intended, is there a workaround for it?

@reft
Copy link

reft commented Mar 1, 2017

@finikm
Copy link
Author

finikm commented Mar 1, 2017

@reft Unfortunately we didn't, even though we didn't spent much time on it. We decided to just display a generic message and move on.

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