Error boundary

The error boundary component repurposes the <ErrorState> component for an application error boundary.

Examples

Error boundary usage example

A basic error boundary appears when an error is thrown inside of the wrapped content.

The component itself has a headerTitle, an errorTitle, and shows an en error stack with details.

Demo content wrapped in error boundary

This is a demo content that may throw an error:

Props

ErrorBoundary

*required
NameTypeDefaultDescription
childrenReact.ReactNodeThe component that the error boundary component is wrapped around, which should be returned if there is no error
defaultErrorDescriptionReact.ReactNodeThe default description text to display with the error if no errorDescription is provided
errorDescriptionReact.ReactNodeThe description text to display with the error
errorTitlestringThe title text to display with the error
errorToggleTextstringThe text for the toggle link that users can select to view error details
headerTitlestringThe title text to display on the error page
ouiaIdstring | numberCustom OUIA ID
silentbooleanIndicates if the error is silent