From d85db017520d06a12aa1a5158a0c882b95ffded5 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Wed, 4 Oct 2017 10:35:55 -0600 Subject: [PATCH] changed custom error to standardized error --- graph/mutators/action.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graph/mutators/action.js b/graph/mutators/action.js index 813d06ec3..ad532e9c4 100644 --- a/graph/mutators/action.js +++ b/graph/mutators/action.js @@ -15,14 +15,14 @@ const getActionItem = async ({loaders: {Comments, Users}}, {item_id, item_type}) if (item_type === 'COMMENTS') { const comment = await Comments.get.load(item_id); if (!comment) { - throw new Error('Comment not found'); + throw errors.ErrNotFound; } return comment; } else if (item_type === 'USERS') { const user = await Users.getByID.load(item_id); if (!user) { - throw new Error('User not found'); + throw errors.ErrNotFound; } return user;