Skip to main content

Error handling

Learn how to handle errors in checkout UI extensions, including techniques for working with Web Workers and integrating third-party error reporting tools like Sentry.


Add an unhandledrejection listener for promise rejections or an error listener for other exceptions like Javascript runtime errors or failures to load a resource.


Anchor to Third party librariesThird party libraries

You can use error reporting libraries like Sentry. However, they might require extra configuration because UI extensions run inside of a Web Worker. You should also consider using source maps to help debug errors.

Tip

You must request network access to transmit errors to a third party service.


Install and initialize Sentry following their Browser JavaScript guide. We recommend disabling the default integrations to be sure it will run within a Web Worker. You'll need to add event listeners manually.


Was this page helpful?