From 3166d09f434462e23ee6702b72ea9e25a254dde4 Mon Sep 17 00:00:00 2001 From: Sophie Stadler Date: Fri, 15 Sep 2023 12:51:59 -0400 Subject: [PATCH] Fix useless GraphQL error --- src/gql/GQLWrapper.tsx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/gql/GQLWrapper.tsx b/src/gql/GQLWrapper.tsx index c89ee7d686..ba3193c943 100644 --- a/src/gql/GQLWrapper.tsx +++ b/src/gql/GQLWrapper.tsx @@ -136,17 +136,11 @@ const authLink = (logout: () => void): ApolloLink => const logErrorsLink = onError(({ graphQLErrors, operation }) => { if (Array.isArray(graphQLErrors)) { graphQLErrors.forEach((gqlErr) => { - reportError( - { - message: "GraphQL Error", - name: gqlErr.message, - }, - { - gqlErr, - operationName: operation.operationName, - variables: operation.variables, - } - ).warning(); + reportError(new Error(gqlErr.message), { + gqlErr, + operationName: operation.operationName, + variables: operation.variables, + }).warning(); }); } // dont track network errors here because they are