Skip to main content

Handling results and errors with the Capacitor Barcode Scanner SDK

This guide explains how to handle scan results and errors in your application, ensuring a smooth user experience.

With version 8.0.0, all SDK errors are thrown as instances of the SBError class, making error handling more consistent and predictable.

Follow the steps below to learn best practices for managing results and handling errors in different UI integrations.

Handling errors

Here's an example of how to handle errors when working with the SDK:

Example of handling errors
loading...

Handling errors in the RTU UI

When using the SDK's Ready-to-Use (RTU) UI Components, you can handle errors as shown in the following example:

Example of handling errors in the Ready-to-Use UI
loading...

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get free trial license