Skip to content
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

ErrorBoundary Component #338

Merged
merged 14 commits into from
Jan 21, 2023
Merged

ErrorBoundary Component #338

merged 14 commits into from
Jan 21, 2023

Conversation

benwis
Copy link
Contributor

@benwis benwis commented Jan 18, 2023

Spent some time working on #311 because I need it for various things. I think I've got a fairly straightforward implementation based on Solid's version.

I also have a prototype of a better error handler fallback. Basically I wrapped Axum's ServeDir to return either the file or a prerendered page in Leptos. That should cover not found errors before anything is downloaded.

Then #311 gives an ErrorBoundary, which adds the ability to return Result<T,E> from a Component, and on Error, render an component at the nearest parent . That should allow us to capture Errors from server fns and resources run inside Views

@benwis
Copy link
Contributor Author

benwis commented Jan 21, 2023

Alright, this should be ready to go. Works in CSR and SSR, although I didn't edit the examples. We can do that later

@gbj gbj merged commit a5531b1 into leptos-rs:main Jan 21, 2023
@gbj gbj mentioned this pull request Jan 21, 2023
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