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

Create FE component for error handling #124

Open
epintozzi opened this issue Feb 18, 2025 · 1 comment
Open

Create FE component for error handling #124

epintozzi opened this issue Feb 18, 2025 · 1 comment
Assignees

Comments

@epintozzi
Copy link
Contributor

epintozzi commented Feb 18, 2025

This component should be the standard used for displaying any errors received from the BE to the FE when trying to create, update, or delete resources.

Rough mockup - open to suggestions/changes

Image

@TDManning
Copy link
Collaborator

TDManning commented Feb 19, 2025

The plan is to implement the following changes/additions:

  • ErrorContext.tsx file to pull any errors on the backend that are handled with the error_serializer.
  • in App.tsx wrap routes with ErrorProvider so that all components have access
  • In the apiCalls.tsx, ensure that errors go to ErrorContext so that users can see them.
  • Write a handler function to pass errors to ErrorContext and also console log errors in the console for devs.
  • update all fetch functions to use the new handler function
  • Test the functionality in the companies component to ensure that its working as expected.
  • Write cypress tests, if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants