Skip to content

Consistently display error messages from backend #1943

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

Closed
14 tasks done
presleyp opened this issue Jun 1, 2022 · 4 comments
Closed
14 tasks done

Consistently display error messages from backend #1943

presleyp opened this issue Jun 1, 2022 · 4 comments
Labels
site Area: frontend dashboard

Comments

@presleyp
Copy link
Contributor

presleyp commented Jun 1, 2022

As was done in the usersXService, we should go through the frontend and make sure all error messages from the API are being unpacked properly to avoid over-reliance on default error messages, or displaying unhelpful error messages (the error has a less helpful message than the response). getErrorMessage and getFormErrors help with this.

To be done

  • convert this to an epic
  • create issues for each XService

Problem

The frontend does not always display the error messages sent from the backend, and even when it does, it does not display the detail that is sometimes sent along with it.

Definition of done for each ticket

  • There are no uses of displayError in this XService. To replace the error snackbar, render ErrorSummary in the relevant components with the dismissible prop. This way, the user can expand the error detail if desired without the snackbar disappearing on them.
  • There are no uses of getFormHelpers in the relevant components; switch to getFormHelpersWithError even if no error. (We will eventually rename it to replace the original getFormHelpers.)
  • The XService always assigns the API error, rather than a hard-coded error message. If a hard-coded error message is needed as a fallback, send it as a prop to ErrorSummary.
  • Errors are only unpacked in ErrorSummary and getFormHelpersWithError.
  • Storybook has a story for when the error(s) are showing.

Tickets

@presleyp presleyp added site Area: frontend dashboard needs grooming 🪒 labels Jun 1, 2022
@presleyp presleyp self-assigned this Jun 1, 2022
@presleyp presleyp added this to the Community MVP milestone Jun 2, 2022
@presleyp presleyp self-assigned this Jun 6, 2022
@presleyp presleyp changed the title Error message audit Consistently display error messages from backend Jun 6, 2022
@presleyp
Copy link
Contributor Author

presleyp commented Jun 8, 2022

I think this should be an epic with one ticket per XService. I'd like to work on it because I already put some thought and code into it, but I don't think it's a high enough priority for pre-launch.

@misskniss
Copy link

Deliverable for this sprint would be to create the Epic and shred it into its issues

@misskniss
Copy link

Let's pick these off to complete as we get time. These are not high priority but should get attention as we go.

@kylecarbs
Copy link
Member

Seems like this issue is decomposed, so I'm going to close it in favor of the others. They'll still reference this so the context isn't lost.

@kylecarbs kylecarbs closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site Area: frontend dashboard
Projects
None yet
Development

No branches or pull requests

3 participants