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

400 Response in Q&A Endpoint Should Display Error #570

Closed
rosiegrant opened this issue Mar 16, 2020 · 1 comment
Closed

400 Response in Q&A Endpoint Should Display Error #570

rosiegrant opened this issue Mar 16, 2020 · 1 comment

Comments

@rosiegrant
Copy link
Contributor

Current Behavior: When the q&a endpoint returns an error (400), we still display a successful response on the front end.

Expected Behavior: If an error is returned from the API, we should display our error state (which already exists here, https://github.com/yext/answers/blob/8af0620afc6a8fab42b0e113414c73fe546e3b60/src/ui/templates/questions/questionsubmission.hbs#L44)

To Replicate:

  • In your test account, add an incorrect entityId to the QASubmission config
  • Submit a question using the frontend component
  • You'll see a "thanks for your question", despite the fact that the request 400's and no question was submitted.

Screen Shot 2020-03-16 at 6 49 46 PM

oshi97 referenced this issue Nov 18, 2020
This commit removes the previous question submission
service code, and uses the new extracted core one.

The qa submission component does not use the data
returned from the endpoint, and the only data returned
is the uuid of the request and any errors.
Currently there is an issue where the component will
ignore any errors returned by the backend, as long
as no error is thrown.

https://github.com/yext/answers/issues/570

This will be addressed in a later pr, once we decide
how to do errors in the new extracted core.

J=SLAP-838
TEST=manual

tested that I can use the qa submission component
added a console.log to the extracted core for sanity's sake
oshi97 referenced this issue Nov 18, 2020
This commit removes the previous question submission
service code, and uses the new extracted core one.

The qa submission component does not use the data
returned from the endpoint, and the only data returned
is the uuid of the request and any errors.
Currently there is an issue where the component will
ignore any errors returned by the backend, as long
as no error is thrown.

https://github.com/yext/answers/issues/570

This will be addressed in a later pr, once we decide
how to do errors in the new extracted core.

J=SLAP-838
TEST=manual

tested that I can use the qa submission component
added a console.log to the extracted core for sanity's sake
oshi97 referenced this issue Nov 20, 2020
This commit removes the previous question submission
service code, and uses the new extracted core one.

The qa submission component does not use the data
returned from the endpoint, and the only data returned
is the uuid of the request and any errors.
Currently there is an issue where the component will
ignore any errors returned by the backend, as long
as no error is thrown.

https://github.com/yext/answers/issues/570

This will be addressed in a later pr, once we decide
how to do errors in the new extracted core.

J=SLAP-838
TEST=manual

tested that I can use the qa submission component
added a console.log to the extracted core for sanity's sake
@cea2aj
Copy link
Member

cea2aj commented Aug 6, 2021

Solved by #1505

@cea2aj cea2aj closed this as completed Aug 6, 2021
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