Automatic reporting

Any error our components have while rendering logs out to console.error(). Many frontend APM tools such as Datadog and Rollbar will automatically pick up on this, and log accordingly. For many of these tools, you should see error reporting automatically happen there with no action on your part.

Manual reporting

If you’d optionally like to handle errors yourself, reporting can be handled safely via the manifold-error custom event. This same custom event fires for all components:

document.addEventListener('manifold-error', e => {
  const { component, error } = e.detail;
  console.log(component); // ManifoldPlanSelector
  console.log(error); // 'Something went wrong'

  // Report error message somewhere, or show something to the user…

User display

We’ll automatically display the same error message to the user via a toast if a component fails to render.