Skip to main content
Skip table of contents

Unhandled Promise Rejection Monitoring

Feature

Germain UX RUM JS captures all JavaScript Unhandled Promise Rejections.

KPIs

KPIs for User Monitoring and Replay | Unhandled-Promise-Rejection-KPIs

Example

Unhandled Promise Rejections on Drill-through

Unhandled Promise Rejections on Drill-through

Configuration

Error Categorization

By default, all unhandled promise rejections are collected as simple events and not errors. Based on the rejection message, you can categorize each rejection and tag it as an error by providing settings.plugins.unhandledRejection.errorCategorizer function in the Init Script.

The following code sample how to categorize these events as errors when their message rejection contains a string error.

JS
const settings = germainApm.getDefaultSettings();
...
settings.plugins.unhandledRejection.errorCategorizer = (reason) => {
   return reason && reason.indexOf('error') > -1;
};
...
germainApm.start(settings);

Component: RUM JS

Feature Availability: 2022.2 or later

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.