This commit is contained in:
seb
2026-09-30 22:37:40 +02:00
parent 3d2f8e9296
commit 74ed74fc68
19 changed files with 122 additions and 56 deletions

View File

@@ -40,8 +40,8 @@ export default function setBrandIdBySku(provider) {
runner,
);
if (brandId !== null && !Number.isFinite(brandId)) {
throw new Error('Brand not found');
if (brandId !== null && (typeof brandId !== 'number' || !Number.isInteger(brandId) || brandId <= 0)) {
throw new Error('Invalid brandId');
}
let resolvedBrandId = null;