aktueller Stand
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user