//Utility const readUserUtility = (id_a)=>{ const currentstore = store.getState(); const returnedArray = currentstore.users.filter((user_object)=>{
You have to create a new Error object and pass that. Below works for me:
throw new Error("item not found");