# Error Boundary

The `New-UDErrorBoundary` component is used for isolating portions of a dashboard to contain components that may throw an error. Many Universal Dashboard components use the error boundary component internally.

If you'd like to isolate a portion of your dashboard to prevent the entire page from failing to load, you can use the following syntax.

```
New-UDErrorBoundary -Content {
    throw "Oh no!"
}
```

If any error is thrown from the content, you will see an error such as thing.

![](https://2374445323-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6jY7sXTmhiAIMGYw_m%2F-MKra153APmpXVo03A9G%2F-MKrb5jMAtBgLZzjIaNU%2Fimage.png?alt=media\&token=599f88a3-8d20-41e7-816d-fe3a032e0a2d)

## API

**New-UDErrorBoundary**

Display an error card when an error is thrown in your script.

| Name    | Type        | Description                                                              | Required |
| ------- | ----------- | ------------------------------------------------------------------------ | -------- |
| Content | ScriptBlock | A script block to prevent from throwing an error to the top of the page. | True     |
