forked from verdnatura/salix-front
refs #6943 add try catch
This commit is contained in:
parent
d08748b1a4
commit
bcdd6965e6
|
@ -167,6 +167,7 @@ const getSamples = async () => {
|
|||
|
||||
getSamples();
|
||||
const onDataSaved = async () => {
|
||||
try {
|
||||
const params = {
|
||||
recipientId: initialData.recipientId,
|
||||
recipient: initialData.recipient,
|
||||
|
@ -176,6 +177,9 @@ const onDataSaved = async () => {
|
|||
const samplesData = await getSamples();
|
||||
const path = `${samplesData.model}/${route.params.id}/${samplesData.code}-email`;
|
||||
await sendEmail(path, params);
|
||||
} catch (error) {
|
||||
notify('errors.create', 'negative');
|
||||
}
|
||||
toCustomerSamples();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue