feat: catch error.

This commit is contained in:
elforjani3
2021-07-24 15:03:13 +02:00
parent fabc8d3b4e
commit f167d5510f
3 changed files with 44 additions and 18 deletions

View File

@@ -51,4 +51,14 @@ export const handleDeleteErrors = (errors) => {
intent: Intent.DANGER,
});
}
if (
errors.find((error) => error.type === 'BILL_HAS_ASSOCIATED_LANDED_COSTS')
) {
AppToaster.show({
message: intl.get(
'cannot_delete_bill_that_has_associated_landed_cost_transactions',
),
intent: Intent.DANGER,
});
}
};