diff --git a/robotoff/app/api.py b/robotoff/app/api.py index 465e5c33d1..276c107a3f 100644 --- a/robotoff/app/api.py +++ b/robotoff/app/api.py @@ -1193,6 +1193,11 @@ def on_post(self, req: falcon.Request, resp: falcon.Response): title="invalid_action", description="action must be one of " "`deleted`, `updated`", ) + if not barcode: + raise falcon.HTTPBadRequest( + title="invalid_barcode", + description="barcode should not be empty", + ) server_type = ServerType.get_from_server_domain(server_domain) product_id = ProductIdentifier(barcode, server_type)