Skip to content

Commit

Permalink
Catch gta api error
Browse files Browse the repository at this point in the history
  • Loading branch information
amandine-sahl committed Jul 3, 2023
1 parent c448e4b commit bd04394
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion front-vite/src/views/EventListingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,12 @@ async function loadSelectedEvent () {
const eventIndex = events.value.findIndex(r => r.id === selectedEventId.value)
if (eventIndex > -1) events.value[eventIndex] = selectedEvent.value
await loadReservations()
gtevent.value = await getTouristicEventDetail(selectedEventId.value)
try {
gtevent.value = await getTouristicEventDetail(selectedEventId.value)
}
catch (error) {
console.log("error") // error on gta api (usually unpubished)
}
selectedEventInfoRDV.value = await getEventInfo(selectedEventId.value)
selectedEventSummary.value = {
sum_participants_adultes: selectedEvent.value.sum_participants_adultes,
Expand Down

0 comments on commit bd04394

Please sign in to comment.