From 8455fd51aa6409b7d0f5c8d183f9fc7a255c6966 Mon Sep 17 00:00:00 2001 From: David Recuenco Date: Wed, 19 Dec 2018 01:03:35 +0100 Subject: [PATCH] UPDATE deleteItem action with custom error message (#4683) --- admin/client/App/screens/Item/actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/client/App/screens/Item/actions.js b/admin/client/App/screens/Item/actions.js index 7b7fe8d324..86ee033623 100644 --- a/admin/client/App/screens/Item/actions.js +++ b/admin/client/App/screens/Item/actions.js @@ -136,7 +136,7 @@ export function deleteItem (id, router) { } // TODO Proper error handling if (err) { - alert('Error deleting item, please try again!'); + alert(err.error || 'Error deleting item, please try again!'); } else { dispatch(loadItems()); }