From 484d77c1f2c086de75110d2a8d9db9062d4a79d0 Mon Sep 17 00:00:00 2001 From: Holman Gao Date: Sat, 3 Nov 2018 11:17:09 -0400 Subject: [PATCH] fix: Don't throw in addition to rejecting a request --- src/relayMutation.js | 5 +---- src/relayQueries.js | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/relayMutation.js b/src/relayMutation.js index 958ac3f..7875c76 100644 --- a/src/relayMutation.js +++ b/src/relayMutation.js @@ -27,10 +27,7 @@ export default function mutation( return fetchWithMiddleware(req) .then(({ data }) => relayRequest.resolve({ response: data })) - .catch(err => { - relayRequest.reject(err); - throw err; - }); + .catch(err => relayRequest.reject(err)); } function hasFiles(relayRequest: RelayClassicRequest): boolean { diff --git a/src/relayQueries.js b/src/relayQueries.js index d2f9993..22ead10 100644 --- a/src/relayQueries.js +++ b/src/relayQueries.js @@ -31,10 +31,7 @@ export default function queries( return fetchWithMiddleware(req) .then(({ data }) => relayRequest.resolve({ response: data })) - .catch(err => { - relayRequest.reject(err); - throw err; - }); + .catch(err => relayRequest.reject(err)); }) ); }