diff --git a/src/pages/Customer/components/CustomerSamplesCreate.vue b/src/pages/Customer/components/CustomerSamplesCreate.vue index 3e5891ef4..79f4fe449 100644 --- a/src/pages/Customer/components/CustomerSamplesCreate.vue +++ b/src/pages/Customer/components/CustomerSamplesCreate.vue @@ -158,11 +158,15 @@ const onSubmit = async () => { }; const getSamples = async () => { - const filter = { where: { id: initialData.typeFk } }; - let { data } = await axios.get('Samples', { - params: { filter: JSON.stringify(filter) }, - }); - return data[0]; + try { + const filter = { where: { id: initialData.typeFk } }; + let { data } = await axios.get('Samples', { + params: { filter: JSON.stringify(filter) }, + }); + return data[0]; + } catch (error) { + notify('errors.create', 'negative'); + } }; getSamples();