Skip to content

Generic Error Boundary#828

Merged
scheidtdav merged 8 commits intodevfrom
feat/generic-error-boundary
Mar 23, 2026
Merged

Generic Error Boundary#828
scheidtdav merged 8 commits intodevfrom
feat/generic-error-boundary

Conversation

@scheidtdav
Copy link
Member

@scheidtdav scheidtdav commented Mar 17, 2026

Type of Change

  • Dependency upgrade
  • Bug fix (non-breaking change)
  • Breaking change
    • e.g. a fixed bug or new feature that may break something else
  • New feature
  • Code quality improvements
    • e.g. refactoring, documentation, tests, tooling, ...

Implementation

First of all the arguably rashly copy-and-pasted duplications of the ever same error boundary were removed.
Some unused code was cleaned up and a generic boundary was added.
This way no component has to declare a boundary itself. They sure can, but don't have to.

Only "downside" to the generic boundary is, that it is displayed on a blank page. However there are convenient back buttons.
If a component wants to handle errors more gracefully, I think it should implement its own version of an error boundary that is more helpful than just showing the generic message but inside its own layout.

Checklist

  • I gave this pull request a meaningful title
  • My pull request is targeting the dev branch
  • I have added documentation to my code
  • I have deleted code that I have commented out

Additional Information

@github-actions
Copy link

github-actions bot commented Mar 17, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 71.27% 1670 / 2343
🔵 Statements 69.58% 1741 / 2502
🔵 Functions 73.33% 341 / 465
🔵 Branches 58.14% 928 / 1596
File CoverageNo changed files found.
Generated in workflow #2246 for commit 7065c72 by the Vitest Coverage Report Action

@scheidtdav scheidtdav marked this pull request as ready for review March 17, 2026 14:51
@scheidtdav scheidtdav requested a review from jona159 March 17, 2026 14:51
Copy link
Contributor

@jona159 jona159 left a comment

Choose a reason for hiding this comment

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

Should we come up with some criteria when we should use a component-level error boundary? It is still a bit unclear to me when we would want to favor it over the root error boundary

@scheidtdav
Copy link
Member Author

Should we come up with some criteria when we should use a component-level error boundary? It is still a bit unclear to me when we would want to favor it over the root error boundary

I have added a quick note above the function itself until there is a better place to put this.
Things like this should go into developer documentation I suppose?
The more specific boundaries we get, the clearer it gets I suppose.

@scheidtdav scheidtdav enabled auto-merge (squash) March 23, 2026 09:22
@scheidtdav scheidtdav merged commit 0812baf into dev Mar 23, 2026
6 checks passed
@scheidtdav scheidtdav deleted the feat/generic-error-boundary branch March 23, 2026 09:27
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

Successfully merging this pull request may close these issues.

2 participants