From 8081578a312cf2930ba814b3d15cf30a9020c437 Mon Sep 17 00:00:00 2001 From: Sophie Stadler Date: Mon, 18 Sep 2023 09:50:30 -0400 Subject: [PATCH] EVG-20661: Fix useless Sentry error (#2041) --- 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