JavaScript Errors

UXCam records the JavaScript errors your users run into and links each one to its session replay, so you can watch what happened before the error.

What is captured

SignalWhen it is recorded
Uncaught errorYour code throws an error that nothing catches.
Unhandled promise rejectionA promise is rejected and nothing handles it.

Each error comes with its type, message and, when the browser provides one, its stack trace. Errors inside same-origin iframes are included.

Errors you catch yourself (try / catch), console.error() calls and errors thrown by browser extensions are not recorded. Flutter Web apps are not supported.

Availability

JavaScript error capture is on by default for all web apps. There is nothing to install or change in your snippet.

  • Where to see errors: in the Tara dashboard at tara.uxcam.com, under Stability. If you are still on the old dashboard (app.uxcam.com), switch to Tara to use the full feature.
  • Turning it off: a setting to control error capture yourself is coming soon. Until then, contact [email protected] to turn it off for an app.

Check that it works

  1. Open your site in a new tab.
  2. Paste this into the browser console:
setTimeout(() => { throw new Error('UXCam test error'); }, 0);
  1. Close the tab and wait for the session to upload.
  2. In the Tara dashboard, open Stability and look for UXCam test error.

What we hide

Error messages can contain user data. Before an error leaves the browser, the SDK replaces sensitive values with placeholders. This is always on.

HiddenShown as
Passwords, tokens, API keys, cookies and session IDs that are labelled, such as password=... or token: ...{redacted}
Email addresses{email}
Phone numbers{phone}
IP addresses{ip}
Numbers of 6 or more digits, such as card or account numbers{number}
URL query strings (everything after ? or #)Removed

For example, Login failed for [email protected], token=abc123 is recorded as Login failed for {email}, token={redacted}.

URLs also go through your own url occlusion function if you have set one. See Occlusion.

🚧

Names and free text are not hidden

The SDK cannot recognise names, addresses or other plain text. A secret with no label in front of it (for example my password is hunter2) is not hidden either. Keep these out of your error messages.

Good to know

Not every error is stored. To stop one broken page from flooding your data, UXCam keeps up to 25 errors per session and up to 3 copies of the same error.

"Script error." with no details. Browsers hide errors thrown by scripts loaded from another domain. To see the full error, add crossorigin="anonymous" to the script tag and make sure its server sends the Access-Control-Allow-Origin header:

<script src="https://cdn.example.com/app.js" crossorigin="anonymous"></script>

Did this page help you?