---
title: "ExtraErrorData"
description: "Extracts all non-native attributes from the error object and attaches them to the event as extra data."
url: https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/integrations/extraerrordata/
---

# ExtraErrorData | Sentry for Nuxt

*Import name: `Sentry.extraErrorDataIntegration`*

This integration extracts all non-native attributes from the error object and attaches them to the event as extra data. If the error object has a .toJSON() method, the ExtraErrorData integration will run it to extract additional information.

**npm**

```javascript
import * as Sentry from "___SDK_PACKAGE___";

Sentry.init({
  dsn: "___PUBLIC_DSN___",
  integrations: [Sentry.extraErrorDataIntegration()],
});
```

**Loader (v7)**

```html
<script>
  // Configure sentryOnLoad before adding the Loader Script
  window.sentryOnLoad = function () {
    Sentry.init({});

    if (Sentry.extraErrorDataIntegration) {
      Sentry.addIntegration(Sentry.extraErrorDataIntegration());
    }
  };
</script>

<script
  src="https://js.sentry-cdn.com/___PUBLIC_KEY___.min.js"
  crossorigin="anonymous"
></script>
<script
  src="https://browser.sentry-cdn.com/7.118.0/extraerrordata.min.js"
  integrity="sha384-8+jHSkkYmPGJyPgzKSl1DEB/wD+KvVtfEBK2pk1LkeeGoxpwtgLO+KnF6Cn5oNyT"
  crossorigin="anonymous"
></script>
```

**Loader (v8)**

```html
<script>
  // Configure sentryOnLoad before adding the Loader Script
  window.sentryOnLoad = function () {
    Sentry.init({});
    Sentry.lazyLoadIntegration("extraErrorDataIntegration").then(
      (integration) => {
        Sentry.addIntegration(integration());
      },
    );
  };
</script>

<script
  src="https://js.sentry-cdn.com/___PUBLIC_KEY___.min.js"
  crossorigin="anonymous"
></script>
```

**CDN**

```html
<script
  src="https://browser.sentry-cdn.com/10.53.1/bundle.tracing.min.js"
  integrity="sha384-FGoRMImH95uAyc72ypTWedaYaOCYskenhS7DgLZp+OsGCx2zs4/Nez3XHPGd55IY"
  crossorigin="anonymous"
></script>
<script
  src="https://browser.sentry-cdn.com/10.53.1/extraerrordata.min.js"
  integrity="sha384-s6njqcTHUUH8vvnrhognnTzIDAPiuO8fEiacNtBi5qk/P1di4o4u1rm8F1NPtw4S"
  crossorigin="anonymous"
></script>

<script>
  Sentry.init({
    dsn: "___PUBLIC_DSN___",
    integrations: [Sentry.extraErrorDataIntegration()],
  });
</script>
```

## [Options](https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/integrations/extraerrordata.md#options)

### [`depth`](https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/integrations/extraerrordata.md#depth)

*Type: `number`*

Limit of how deep the object serializer should go. The default is 3. Anything deeper than the set limit will be replaced with standard Node.js REPL notation of \[Object], \[Array], \[Function], or a primitive value.

### [`captureErrorCause`](https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/integrations/extraerrordata.md#captureerrorcause)

*Type: `boolean`*

Indicates if the serializer should catch the `cause` of the error. The default is true. For more information, see the [Error: cause MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause).
