Ignore GraphQLError in Sentry plugin (#555)

This commit is contained in:
Kamil Kisiela 2022-10-27 11:15:24 +02:00 committed by GitHub
parent e8579d00c4
commit c47df8338a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -139,12 +139,13 @@ export const graphqlHandler = (options: GraphQLHandlerOptions): RouteHandlerMeth
// It's the readiness check
return args.operationName === 'readiness';
},
skipError: isGraphQLError,
}),
useSentryUser(),
useErrorHandler(({ errors, context }): void => {
for (const error of errors) {
// Only log unexpected errors.
if (isGraphQLError(error) && isGraphQLError(error.originalError)) {
if (isGraphQLError(error)) {
continue;
}