Feature: Ability to opt out of built in error handling#305
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an opt-in feature to disable the built-in DOM-based error handling in the FileDiff and File components, allowing developers to handle rendering errors with custom error boundaries or other mechanisms.
Changes:
- Added
disableErrorHandlingboolean option to FileDiff and File components - When enabled, rendering errors are rethrown instead of being caught and displayed in the DOM
- Updated documentation in both VanillaAPI and ReactAPI constants files
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| packages/diffs/src/components/FileDiff.ts | Added disableErrorHandling option to FileDiffOptions interface and implemented error rethrow logic in the render method |
| packages/diffs/src/components/File.ts | Added disableErrorHandling option to FileOptions interface and implemented error rethrow logic in the render method |
| apps/docs/app/docs/VanillaAPI/constants.ts | Added documentation examples for the new disableErrorHandling option in both FileDiff and File examples |
| apps/docs/app/docs/ReactAPI/constants.ts | Added documentation examples for the new disableErrorHandling option in both DiffOptions and FileOptions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
amadeus
added a commit
that referenced
this pull request
Jan 30, 2026
* Add prop to disable error handling * Add docs * Update apps/docs/app/docs/VanillaAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/docs/app/docs/ReactAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/docs/app/docs/VanillaAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/docs/app/docs/ReactAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
amadeus
added a commit
that referenced
this pull request
Jan 30, 2026
* Add prop to disable error handling * Add docs * Update apps/docs/app/docs/VanillaAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/docs/app/docs/ReactAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/docs/app/docs/VanillaAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/docs/app/docs/ReactAPI/constants.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Basically File/FileDiff components can now opt out of the built in dom based error handling.
The prop to do so is
disableErrorHandling: trueFixes #290