Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

ProductBarcode: backend: improve verbosity for user

Crumb Owl36d5ae1466a2
diff --git a/backend/app/api/handlers/v1/v1_ctrl_product_search.go b/backend/app/api/handlers/v1/v1_ctrl_product_search.go
index e9fae0ec..832def4d 100644
--- a/backend/app/api/handlers/v1/v1_ctrl_product_search.go
+++ b/backend/app/api/handlers/v1/v1_ctrl_product_search.go
@@ -182,7 +182,8 @@ func (ctrl *V1Controller) HandleProductSearchFromBarcode(conf config.BarcodeAPIC
// Barcode spider implementation
barcodespider := func(tokenAPI string, iEan string) ([]repo.BarcodeProduct, error) {
if len(tokenAPI) == 0 {
- return nil, errors.New("no api token configured for barcodespider")
+ return nil, errors.New("no api token configured for barcodespider. " +
+ "Please define the api token in environment variable HBOX_BARCODE_TOKEN_BARCODESPIDER")
}
req, err := http.NewRequest(