Update error handling

This commit is contained in:
Hammad Jutt
2020-08-17 01:51:08 -06:00
parent 92ef36ebbf
commit 19bd2ce197

View File

@@ -20,9 +20,7 @@ export const getPlayers = async (limit = 50) => {
if (!data) {
if (error) {
throw new Error(
`${error.message}${JSON.stringify(error.graphQLErrors, null, 2)}`,
);
throw error;
}
return [];