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

Update logic to read exception from api response #92

Open
rickywid opened this issue Oct 9, 2019 · 1 comment
Open

Update logic to read exception from api response #92

rickywid opened this issue Oct 9, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@rickywid
Copy link
Contributor

rickywid commented Oct 9, 2019

Update logic to read exception from api response

Example:
If tries to signup with an existing email address. The client should read the server response and display the error message.

@rickywid rickywid added the bug Something isn't working label Oct 9, 2019
@ghost ghost closed this as completed in eef73a5 Dec 25, 2019
@roymoran roymoran reopened this Feb 11, 2020
@roymoran
Copy link
Member

@rmjordas looks like we already had an issue for this and it was closed. Although the issue technically wasn't resolved - I've opened it again so we can re-visit it. I took a look at the code and this doesn't necessarily need a refactor for the http client class like I originally said - we just need to make sure we display the error message the api returns if the request fails.

You can reproduce by visiting the test/production environment and submitting the signup form with an existing email. The API returns the Error object. But we have hard coded the UI to display a different message which becomes confusing like someone pointed out in #general.

Here's the UI and message we display
Screen Shot 2020-02-11 at 5 12 19 PM

Here's the message we should display. It isn't any better but that's an issue I can resolve on the backend.
Screen Shot 2020-02-11 at 4 52 23 PM

If you can resolve this one - we will use it as a pattern to display api error messages for other api requests we make.

@rmjordas rmjordas self-assigned this Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants