aktueller Stand

This commit is contained in:
root
2025-11-09 15:22:33 +01:00
parent 685d50d56a
commit 4fa7217fc3
3 changed files with 100 additions and 58 deletions

View File

@@ -168,7 +168,13 @@ async function annotateStoresWithPickupSlots(stores, cookieHeader, delayBetweenR
const pickups = await fetchPickups(store.id, cookieHeader);
hasPickupSlots = Array.isArray(pickups) && pickups.length > 0;
} catch (error) {
console.warn(`Pickups für Store ${store.id} konnten nicht geprüft werden:`, error.message);
const status = error?.response?.status;
if (status === 403) {
hasPickupSlots = false;
console.warn(`Pickups für Store ${store.id} nicht erlaubt (403) wird als ohne Slots behandelt.`);
} else {
console.warn(`Pickups für Store ${store.id} konnten nicht geprüft werden:`, error.message);
}
}
annotated.push({ ...store, hasPickupSlots });
}