HTTP 400validation
Batch too large
batch_too_large
What it means
`/v1/check/batch` enforces a 100-ingredient maximum per call. You sent more.
Common causes
- ERP item-master export was bigger than 100 rows.
- Loop didn't paginate.
How to fix
- Chunk the array client-side into ≤100-item batches.
- Reuse a single `Idempotency-Key` per chunk so retries are safe.
Example
// Chunk in TypeScript
for (let i = 0; i < items.length; i += 100) {
const chunk = items.slice(i, i + 100);
await fetch("…/v1/check/batch", { … body: { region, ingredients: chunk } });
}