Unverified Commit e70aed8f authored by Michal Srb's avatar Michal Srb Committed by GitHub

docs: bubbling errors with error boundaries (#68185)

Co-authored-by: 's avatarLee Robinson <me@leerob.io>
parent 6f0581af
...@@ -211,6 +211,8 @@ export default function Error({ error, reset }) { ...@@ -211,6 +211,8 @@ export default function Error({ error, reset }) {
} }
``` ```
If you want errors to bubble up to the parent error boundary, you can `throw` when rendering the `error` component.
### Handling Errors in Nested Routes ### Handling Errors in Nested Routes
Errors will bubble up to the nearest parent error boundary. This allows for granular error handling by placing `error.tsx` files at different levels in the [route hierarchy](/docs/app/building-your-application/routing#component-hierarchy). Errors will bubble up to the nearest parent error boundary. This allows for granular error handling by placing `error.tsx` files at different levels in the [route hierarchy](/docs/app/building-your-application/routing#component-hierarchy).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment