diff --git a/client/src/repo/accommodationRepo.ts b/client/src/repo/accommodationRepo.ts index 80a587a1..03a880d2 100644 --- a/client/src/repo/accommodationRepo.ts +++ b/client/src/repo/accommodationRepo.ts @@ -11,7 +11,7 @@ export const accommodationRepo = { const refresh = (async () => { try { const result = await accommodationsApi.list(tripId) - await upsertAccommodations(result.accommodations || []) + upsertAccommodations(result.accommodations || []).catch(() => {}) return result } catch { return null diff --git a/client/src/repo/budgetRepo.ts b/client/src/repo/budgetRepo.ts index 81b28662..99e66e15 100644 --- a/client/src/repo/budgetRepo.ts +++ b/client/src/repo/budgetRepo.ts @@ -13,7 +13,7 @@ export const budgetRepo = { const refresh = (async () => { try { const result = await budgetApi.list(tripId) - await upsertBudgetItems(result.items) + upsertBudgetItems(result.items).catch(() => {}) return result } catch { return null diff --git a/client/src/repo/dayRepo.ts b/client/src/repo/dayRepo.ts index 9ddb1d6a..7db0a2b0 100644 --- a/client/src/repo/dayRepo.ts +++ b/client/src/repo/dayRepo.ts @@ -13,7 +13,7 @@ export const dayRepo = { const refresh = (async () => { try { const result = await daysApi.list(tripId) - await upsertDays(result.days) + upsertDays(result.days).catch(() => {}) return result } catch { return null diff --git a/client/src/repo/fileRepo.ts b/client/src/repo/fileRepo.ts index 691c753e..d1a89476 100644 --- a/client/src/repo/fileRepo.ts +++ b/client/src/repo/fileRepo.ts @@ -13,7 +13,7 @@ export const fileRepo = { const refresh = (async () => { try { const result = await filesApi.list(tripId) - await upsertTripFiles(result.files) + upsertTripFiles(result.files).catch(() => {}) return result } catch { return null diff --git a/client/src/repo/packingRepo.ts b/client/src/repo/packingRepo.ts index 18a2c001..d036f1b3 100644 --- a/client/src/repo/packingRepo.ts +++ b/client/src/repo/packingRepo.ts @@ -13,7 +13,7 @@ export const packingRepo = { const refresh = (async () => { try { const result = await packingApi.list(tripId) - await upsertPackingItems(result.items) + upsertPackingItems(result.items).catch(() => {}) return result } catch { return null diff --git a/client/src/repo/placeRepo.ts b/client/src/repo/placeRepo.ts index dad8fcae..b1d59d12 100644 --- a/client/src/repo/placeRepo.ts +++ b/client/src/repo/placeRepo.ts @@ -13,7 +13,7 @@ export const placeRepo = { const refresh = (async () => { try { const result = await placesApi.list(tripId, params) - await upsertPlaces(result.places) + upsertPlaces(result.places).catch(() => {}) return result } catch { return null diff --git a/client/src/repo/reservationRepo.ts b/client/src/repo/reservationRepo.ts index ea104b0f..2b23395d 100644 --- a/client/src/repo/reservationRepo.ts +++ b/client/src/repo/reservationRepo.ts @@ -13,7 +13,7 @@ export const reservationRepo = { const refresh = (async () => { try { const result = await reservationsApi.list(tripId) - await upsertReservations(result.reservations) + upsertReservations(result.reservations).catch(() => {}) return result } catch { return null diff --git a/client/src/repo/todoRepo.ts b/client/src/repo/todoRepo.ts index 6cf8f7c4..7b37ea62 100644 --- a/client/src/repo/todoRepo.ts +++ b/client/src/repo/todoRepo.ts @@ -13,7 +13,7 @@ export const todoRepo = { const refresh = (async () => { try { const result = await todoApi.list(tripId) - await upsertTodoItems(result.items) + upsertTodoItems(result.items).catch(() => {}) return result } catch { return null diff --git a/client/src/repo/tripRepo.ts b/client/src/repo/tripRepo.ts index 1d91019b..43ca0de8 100644 --- a/client/src/repo/tripRepo.ts +++ b/client/src/repo/tripRepo.ts @@ -16,10 +16,10 @@ export const tripRepo = { tripsApi.list(), tripsApi.list({ archived: 1 }), ]) - await Promise.all([ + Promise.all([ ...active.trips.map(t => upsertTrip(t)), ...archived.trips.map(t => upsertTrip(t)), - ]) + ]).catch(() => {}) return { trips: active.trips, archivedTrips: archived.trips } } catch { return null @@ -46,7 +46,7 @@ export const tripRepo = { const refresh: TripRefresh = (async () => { try { const result = await tripsApi.get(tripId) - await upsertTrip(result.trip) + upsertTrip(result.trip).catch(() => {}) return result } catch { return null