diff --git a/src/pages/Ticket/TicketAdvance.vue b/src/pages/Ticket/TicketAdvance.vue index 8de602b37..c247a20bc 100644 --- a/src/pages/Ticket/TicketAdvance.vue +++ b/src/pages/Ticket/TicketAdvance.vue @@ -213,10 +213,7 @@ const requestComponentUpdate = async (ticket, isWithoutNegatives) => { warehouseFk: ticket.futureWarehouseFk, }); - if (!newLanded) { - notify(t('advanceTickets.noDeliveryZone'), 'negative'); - return; - } + if (!newLanded) throw new Error(t('advanceTickets.noDeliveryZone')); ticket.landed = newLanded.landed; ticket.zoneFk = newLanded.zoneFk; @@ -299,10 +296,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); }