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?
5 Replies
zulu
zulu5d ago
yes you are missing this case https://playground.solidjs.com/anonymous/78077569-47d3-476b-8927-d8b668903100 @ryansolid is this a bug or bad usage
ryansolid
ryansolid5d ago
Bad usage. You can see it from the types. Doesn't accept a function as children
zulu
zulu5d ago
yeah thought so, but didn't see any warning in the playground.
ryansolid
ryansolid5d ago
I see red sqiggly
zulu
zulu5d ago
you are right, something was wrong in the tab, I opened in a new tab and I see it
No description

Did you find this page helpful?