Hello I’m trying to bulid a bookings timetable based on this https://www.wix.com/corvid/example/timetable but this part of code causes an error when live (not on preview)
requestedServices.forEach(requestedservice => {
console.log('requestedservice', requestedservice)
const slotsPromise = wixBookings.getServiceAvailability(requestedservice._id, availabilityOptions).then(result => {
result.slots.forEach(slot => slots.push(slot));
});
slotsPromises.push(slotsPromise);
});
and this is the error
wich appears to be a “Too Many Requests” error. Note that requestedServices is a 40 elements list. So I tried this
requestedServices.slice(0,10).forEach(requestedservice => {const slotsPromise = wixBookings.getServiceAvailability(requestedservice._id, availabilityOptions).then(result => { result.slots.forEach(slot => slots.push(slot)); }); slotsPromises.push(slotsPromise); });
which worked, so it appears that wixBookings.getServiceAvailability is rate limited, any suggestion on how to solve this?