Cart AJAX API change.js returns 400 if you pass more then 1 consecutive call with line

We have a group of products that are bound together, like bundles.

If the customer removes the parent product then all the children associated with that product will be deleted from the cart.

if there is only one child product then change js is working fine but if we have more than 1 child associated with the product js returns a 400 error code with the error message ‘no valid id or line parameter’.

I tried with the id parameter also, in that case, js is returning the cart item count as 1 always. because of which the cart is not cleared.

is there a way we can rectify this issue?

Wait for each call to finish before firing the next. Are you doing that or just blasting multiple change requests at once (if you are an error should be expected).