Rewrites ErrorBoundary as class Component to catch errors #1584

Closed
opened 2026-04-05 16:29:11 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @yashug on 10/6/2023

Title of this pull request?

ErrorBoundary As class component

Small Description?

In this pull request, we've made a crucial improvement to our error boundary implementation. The original error boundary was implemented as a functional component using a try...catch block, which had limitations in capturing errors thrown by child components.

In addition to the refactoring, we've included thorough test cases to ensure the reliability of the error boundary.

Pull Request Checklist:

  • Please make sure all jobs pass before requesting a review.
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).
  • Have you lint your code locally before submission?
  • Did you write tests where appropriate?

Screenshots (if appropriate):

*Originally created by @yashug on 10/6/2023* ### Title of this pull request? ErrorBoundary As class component ### Small Description? In this pull request, we've made a crucial improvement to our error boundary implementation. The original error boundary was implemented as a functional component using a try...catch block, which had limitations in capturing errors thrown by child components. In addition to the refactoring, we've included thorough test cases to ensure the reliability of the error boundary. ### Pull Request Checklist: - [x] Please make sure all jobs pass before requesting a review. - [ ] Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such). - [x] Have you lint your code locally before submission? - [x] Did you write tests where appropriate? ### Related Issue? ### Screenshots (if appropriate):
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#1584