# Error Tracking



VitalSentinel automatically captures JavaScript errors and resource loading failures experienced by your website visitors, helping you identify and fix issues before they impact user experience.

This page is part of [RUM Monitoring](/features/rum-monitoring) and lives at **Domain** → **RUM** → **Errors**.

## How It Works [#how-it-works]

The RUM script automatically captures three kinds of errors:

1. **JavaScript Errors** - Uncaught exceptions (`window.onerror`)
2. **Unhandled Promise Rejections** - Rejected promises with no handler
3. **Resource Errors** - Failed image, script, stylesheet, video, audio, and iframe loads

The error list shows individual error events by default. You can switch to a grouped view that aggregates errors by type (the message up to the first colon), with an occurrence count and affected-session count per group.

## Dashboard Overview [#dashboard-overview]

### Summary Cards [#summary-cards]

At the top of the page:

| Card              | Description                                                                              |
| ----------------- | ---------------------------------------------------------------------------------------- |
| Total errors      | Total error occurrences in the period                                                    |
| Affected sessions | Percentage of sessions with at least one error, plus the affected / total session counts |

### Error List [#error-list]

The list has two views, toggled at the top right:

* **Events** (default) – individual error events, 50 per page. Each row shows the error message, its type, the source file and line, the environment (browser and OS), and when it occurred. Expand a row for full detail.
* **Types** – errors grouped by kind (the message up to the first colon). Each group shows its type, when it was last seen, the number of occurrences, and the number of affected sessions. Expand a group to see its latest example events.

### Search and Filters [#search-and-filters]

Above the list you'll find:

* **Search** - free-text match against the error message, type, and URL.
* **Type filter** - JavaScript, Resource, or Unhandled Rejection (the options reflect the error types present in your data).
* **Browser, OS, and device filters** - narrow to a specific environment.
* **Expand a row** - see the captured stack trace, resource details, environment, and page context.

## Filtering Errors [#filtering-errors]

Filter the error list by:

### Error Type [#error-type]

* **JavaScript** - Runtime JavaScript exceptions
* **Resource** - Failed resource loads (images, scripts, stylesheets, and similar)
* **Unhandled Rejection** - Promise rejections with no handler

### Browser [#browser]

Filter by browser to identify browser-specific issues:

* Chrome
* Firefox
* Safari
* Edge

### Operating System [#operating-system]

Filter by OS to find platform-specific problems:

* Windows
* macOS
* iOS
* Android
* Linux

### Device Type [#device-type]

Filter by device category:

* Desktop
* Mobile
* Tablet

## Error Details [#error-details]

Expand any error event to see its full context:

### Error Details [#error-details-1]

Type, message, source file and line, and – for resource errors – the failing resource URL and element.

### Environment [#environment]

Browser and version, operating system, device type, and country.

### Context [#context]

Page URL, referrer, and session ID.

### Stack Trace [#stack-trace]

The captured stack trace, when available.

## Common Error Types [#common-error-types]

### Uncaught TypeError [#uncaught-typeerror]

Usually caused by:

* Accessing properties of undefined/null
* Calling non-functions
* Invalid type operations

**Example:**

```
Uncaught TypeError: Cannot read property 'foo' of undefined
```

### Uncaught ReferenceError [#uncaught-referenceerror]

Usually caused by:

* Using undefined variables
* Typos in variable names
* Script loading order issues

**Example:**

```
Uncaught ReferenceError: myFunction is not defined
```

### Resource Loading Errors [#resource-loading-errors]

Failed to load external resources:

| Resource    | Common Causes                 |
| ----------- | ----------------------------- |
| Images      | 404, wrong path, CDN issues   |
| Scripts     | 404, CORS blocked, CDN issues |
| Stylesheets | 404, wrong path               |
| Fonts       | CORS, 404, format issues      |

<Callout type="info">
  Failed `fetch` or `XMLHttpRequest` calls are not captured as a separate category. They appear here only if they surface as an uncaught error or an unhandled promise rejection.
</Callout>

## Best Practices [#best-practices]

### Prioritize by Impact [#prioritize-by-impact]

Focus on errors affecting the most sessions:

1. Sort by affected sessions percentage
2. Fix high-impact errors first
3. Monitor trends after fixes

### Check Browser Distribution [#check-browser-distribution]

If an error only occurs in one browser:

* Check browser compatibility
* Review polyfills
* Test in that browser specifically

### Monitor After Deployments [#monitor-after-deployments]

After releasing new code:

1. Check for new errors
2. Compare error counts before/after
3. Roll back if necessary

### Set Up Alerts [#set-up-alerts]

Create alerts for error spikes:

1. Go to **Alerts**
2. Create a RUM alert
3. Set the metric to **Error Rate within last 24h** and enter a threshold percentage (for example, 5%)
4. Get notified when errors increase

## Related Features [#related-features]

<Cards>
  <Card title="RUM Monitoring" href="/features/rum-monitoring">
    Performance monitoring overview
  </Card>

  <Card title="Setting Up Alerts" href="/alerts/setting-up-alerts">
    Get notified of error spikes
  </Card>
</Cards>
