Skip to content

Commit

Permalink
fix: skip logging graphQl Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Oct 25, 2023
1 parent 6b79c3c commit ba89e8b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/helpers/metrics.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import init, { client } from '@snapshot-labs/snapshot-metrics';
import { capture } from '@snapshot-labs/snapshot-sentry';
import { Express, type Request, type Response } from 'express';
import { parse } from 'graphql';
import { GraphQLError, parse } from 'graphql';
import { spacesMetadata } from './spaces';
import { strategies } from './strategies';
import db from './mysql';
Expand Down Expand Up @@ -71,7 +71,9 @@ export default function initMetrics(app: Express) {
}
}
} catch (e: any) {
capture(e);
if (!(e instanceof GraphQLError)) {
capture(e);
}
}
});
}
Expand Down

0 comments on commit ba89e8b

Please sign in to comment.