Skip to content

Rethrow error from ErrorFallback #82

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

Merged
merged 1 commit into from
Jun 26, 2025
Merged

Conversation

justinmcbride
Copy link
Collaborator

When this Spark is being edited in development, rethrow the error for it to be caught by the parent container. In deployed sparks, the error boundary will be shown.

@Copilot Copilot AI review requested due to automatic review settings June 26, 2025 22:53
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the error fallback behavior so that, in development mode, errors are rethrown rather than being caught by the error boundary.

  • Added a development-only conditional to rethrow errors
  • Retains the fallback UI for deployed sparks

@@ -4,6 +4,10 @@ import { Button } from "./components/ui/button";
import { AlertTriangleIcon, RefreshCwIcon } from "lucide-react";

export const ErrorFallback = ({ error, resetErrorBoundary }) => {
Copy link
Preview

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

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

Consider adding explicit TypeScript type definitions for the props (error and resetErrorBoundary) of the ErrorFallback component to improve clarity and maintainability.

Copilot uses AI. Check for mistakes.

@justinmcbride justinmcbride merged commit 31cbba8 into main Jun 26, 2025
3 checks passed
@justinmcbride justinmcbride deleted the justinmcbride-patch-1 branch June 26, 2025 22:58
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