georapbox / barcode-scanner

A Progressive Web Application (PWA) that scans barcodes of various formats, using the Barcode Detection API.
https://georapbox.github.io/barcode-scanner/
MIT License
65 stars 30 forks source link

Empty rawValue in barcode detection should trigger error message #13

Closed georapbox closed 1 month ago

georapbox commented 1 month ago

In certain instances, even though the barcode detector identifies a barcode, the rawValue property of the result is empty.

SCR-20240729-qxxk

In these scenarios, we should display an error message similar to the one shown when the scanned image is not a barcode. Refer to the screenshot below for reference:

Screenshot 2024-07-29 at 7 22 58 PM

Currently, no error message is displayed in such cases, which can misleadingly indicate that a barcode was successfully detected. See the screenshot below for details:

Screenshot 2024-07-29 at 7 20 33 PM