diff --git a/src/pages/Ticket/TicketAdvance.vue b/src/pages/Ticket/TicketAdvance.vue index 8de602b37..71e3926ac 100644 --- a/src/pages/Ticket/TicketAdvance.vue +++ b/src/pages/Ticket/TicketAdvance.vue @@ -215,7 +215,7 @@ const requestComponentUpdate = async (ticket, isWithoutNegatives) => { if (!newLanded) { notify(t('advanceTickets.noDeliveryZone'), 'negative'); - return; + throw new Error(t('advanceTickets.noDeliveryZone')); } ticket.landed = newLanded.landed; @@ -299,10 +299,10 @@ const splitTickets = async () => { const { query, params } = await requestComponentUpdate(ticket, true); await axios.post(query, params); progressAdd(ticket.futureId); - } catch (error) { + } catch (e) { splitErrors.value.push({ id: ticket.futureId, - reason: error.response?.data?.error?.message, + reason: e.message || e.response?.data?.error?.message, }); progressAdd(ticket.futureId); }