Skip to content

Commit

Permalink
fix: Don't throw in addition to rejecting a request
Browse files Browse the repository at this point in the history
  • Loading branch information
golmansax authored and nodkz committed Nov 3, 2018
1 parent 84b3361 commit 484d77c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/relayMutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 1 addition & 4 deletions src/relayQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
})
);
}

0 comments on commit 484d77c

Please sign in to comment.