Skip to content

Commit

Permalink
Also special case other pre-requestDidStart errors.
Browse files Browse the repository at this point in the history
To preserve the same behavior as before #3614.
  • Loading branch information
abernix committed Dec 26, 2019
1 parent 9babef8 commit 834b529
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/apollo-engine-reporting/src/treeBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import {
responsePathAsArray,
} from 'graphql';
import { Trace, google } from 'apollo-engine-reporting-protobuf';
import { PersistedQueryNotFoundError } from 'apollo-server-errors';
import {
PersistedQueryNotFoundError,
PersistedQueryNotSupportedError,
} from 'apollo-server-errors';
import { InvalidGraphQLRequestError } from "apollo-server-types";

function internalError(message: string) {
return new Error(`[internal apollo-server error] ${message}`);
Expand Down Expand Up @@ -78,7 +82,9 @@ export class EngineReportingTreeBuilder {

public didEncounterErrors(errors: GraphQLError[]) {
errors.forEach(err => {
if (err instanceof PersistedQueryNotFoundError) {
if (err instanceof PersistedQueryNotFoundError ||
err instanceof PersistedQueryNotSupportedError ||
err instanceof InvalidGraphQLRequestError) {
return;
}

Expand Down

0 comments on commit 834b529

Please sign in to comment.