SolidJSS
SolidJSโ€ข11mo agoโ€ข
5 replies
Amir Hossein Hashemi

When, and what types of errors <ErrorBoundary> catch?

The docs are not clear about exactly what types of errors are caught by <ErrorBoundary>. My understanding is that:

<ErrorBoundary> catches any error that occurs during rendering or updating its children. That includes:

- Errors that occur while rendering the JSX.
- Errors that occur within createEffect, createMemo, and other synchronous state management primitives.

But errors occurring outside the rendering process, for example, in event handlers or after a setTimeout or async work are not caught by error boundaries.

Is that accurate? Are there other scenarios that I'm missing?
Was this page helpful?