Skip to content

Add client side error handling.#937

Merged
peterp merged 13 commits intomainfrom
pp-client-side-error-handling
Dec 22, 2025
Merged

Add client side error handling.#937
peterp merged 13 commits intomainfrom
pp-client-side-error-handling

Conversation

@peterp
Copy link
Copy Markdown
Member

@peterp peterp commented Dec 22, 2025

This PR exposes hydrateOptions to initClient. This allows a user to define generic error handling.

Passes hydrateRootOptions directly to hydrateRoot, enabling users to configure React 19 error handling APIs (onUncaughtError, onCaughtError, etc.).

Changes

  1. Remove hardcoded error handler in client.tsx
  2. Pass hydrateRootOptions directly to hydrateRoot
  3. Add error handling documentation and guide
  4. Add playground example demonstrating error handling

Breaking Changes
None. The hardcoded console.error handler is a default fallback.

Closes #656

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Dec 22, 2025

Deploying redwood-sdk-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7fc463b
Status: ✅  Deploy successful!
Preview URL: https://0589ea43.redwood-sdk-docs.pages.dev
Branch Preview URL: https://pp-client-side-error-handlin.redwood-sdk-docs.pages.dev

View logs

@peterp peterp merged commit e2723d3 into main Dec 22, 2025
7 checks passed
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.

Proposal: Expose React 19 Error Handling APIs in RedwoodSDK

1 participant