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

PIMS-1291 React Error Boundary #2193

Merged
merged 21 commits into from
Feb 27, 2024
Merged

PIMS-1291 React Error Boundary #2193

merged 21 commits into from
Feb 27, 2024

Conversation

dbarkowsky
Copy link
Collaborator

@dbarkowsky dbarkowsky commented Feb 16, 2024

🎯 Summary

PIMS-1291

Adds an Error Boundary that will catch rendering errors. If a rendering error occurs, it defaults to this page instead.
It does not catch errors in "logic", so if a page renders but other Javascript/Typescript code throws an error, it doesn't catch those.

Changes

  • Frontend error fallback page with option to submit report.
  • API route that takes that error and logs it (for now)

Testing

  • Navigate to localhost:3000/dev. Clicking the button there should cause a rendering error.
  • Test out the reporting options. See the API console for the error log.

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

Copy link

🚀 Deployment Information

The React APP Image has been built with the tag: 2193. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the APP deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link

🚀 Deployment Information

The API Image has been built with the tag: 2193. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the API deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link

codeclimate bot commented Feb 16, 2024

Code Climate has analyzed commit 2ead880 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 93.4%.

View more on Code Climate.

Copy link
Collaborator

@TaylorFries TaylorFries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error page looks great and functions well.

@dbarkowsky dbarkowsky merged commit 92ed375 into main Feb 27, 2024
9 checks passed
@dbarkowsky dbarkowsky deleted the PIMS-1291-React-ErrorBoundary branch February 27, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants