---
title: "Solid Error Boundary"
description: "Learn how to wrap Solid error boundaries to automatically capture errors."
url: https://docs.sentry.io/platforms/javascript/guides/solid/features/error-boundary/
---

# Solid Error Boundary | Sentry for Solid

The Sentry SDK exports a function to wrap the native Solid error boundary component to automatically capture exceptions from inside a component tree and render a fallback component.

Wrap the native Solid `ErrorBoundary` component with `Sentry.withSentryErrorBoundary`.

```jsx
import * as Sentry from "@sentry/solid";
import { ErrorBoundary } from "solid-js";

// Wrap Solid's ErrorBoundary to automatically capture exceptions
const SentryErrorBoundary = Sentry.withSentryErrorBoundary(ErrorBoundary);

export default function SomeComponent() {
  return (
    <SentryErrorBoundary
      fallback={(err) => <div>Error: {err.message}</div>}
    >
      <div>Some Component</div>
    </SentryErrorBoundary>
  );
}
```
