diff --git a/app/api/src/docker/aws-emulator.js b/app/api/src/docker/aws-emulator.js index 36e60c0..d237030 100644 --- a/app/api/src/docker/aws-emulator.js +++ b/app/api/src/docker/aws-emulator.js @@ -26,7 +26,7 @@ app.post('/cadquery/stl', async (req, res) => { console.log('making post request to 5060') try { const { data } = await axios.post(invocationURL(5060), { - body: req.body + body: req.body, }) res.status(data.statusCode) res.send(data.body) diff --git a/app/api/src/functions/graphql.js b/app/api/src/functions/graphql.js index 45ae461..835949a 100644 --- a/app/api/src/functions/graphql.js +++ b/app/api/src/functions/graphql.js @@ -17,9 +17,7 @@ export const handler = createGraphQLHandler({ schemas, services: makeServices({ services }), }), - plugins: [ - createSentryApolloPlugin(), - ], + plugins: [createSentryApolloPlugin()], onException: () => { // Disconnect from your database with an unhandled exception. db.$disconnect() diff --git a/app/api/src/lib/sentry.ts b/app/api/src/lib/sentry.ts index 34c583a..bbabe5c 100644 --- a/app/api/src/lib/sentry.ts +++ b/app/api/src/lib/sentry.ts @@ -62,45 +62,44 @@ export const createSentryApolloPlugin: Config['plugins'][number] = () => ({ // If we couldn't parse the operation, don't // do anything here if (!ctx.operation) { - return; + return } for (const err of ctx.errors) { // Only report internal server errors, // all errors extending ApolloError should be user-facing if (err instanceof ApolloError) { - continue; + continue } // Add scoped report details and send to Sentry - Sentry.withScope(scope => { + Sentry.withScope((scope) => { // Annotate whether failing operation was query/mutation/subscription - scope.setTag("kind", ctx.operation.operation); + scope.setTag('kind', ctx.operation.operation) // Log query and variables as extras (make sure to strip out sensitive data!) - scope.setExtra("query", ctx.request.query); - scope.setExtra("variables", ctx.request.variables); + scope.setExtra('query', ctx.request.query) + scope.setExtra('variables', ctx.request.variables) if (err.path) { // We can also add the path as breadcrumb scope.addBreadcrumb({ - category: "query-path", - message: err.path.join(" > "), - level: Sentry.Severity.Debug - }); + category: 'query-path', + message: err.path.join(' > '), + level: Sentry.Severity.Debug, + }) } - const transactionId = ctx.request.http.headers.get( - "x-transaction-id" - ); + const transactionId = + ctx.request.http.headers.get('x-transaction-id') if (transactionId) { - scope.setTransaction(transactionId); + scope.setTransaction(transactionId) } - Sentry.captureException(err); - }); + Sentry.captureException(err) + }) } - } + }, } - } + }, }) diff --git a/app/web/src/components/OutBound/OutBound.js b/app/web/src/components/OutBound/OutBound.js index 355f9a6..bb2d3f1 100644 --- a/app/web/src/components/OutBound/OutBound.js +++ b/app/web/src/components/OutBound/OutBound.js @@ -13,6 +13,7 @@ const OutBound = ({ className, children, to }) => { }) return true }} + rel="noreferrer" > {children}