From 4937478be30584f3747945bfbafcfe69ef65f46d Mon Sep 17 00:00:00 2001 From: Stephen Barlow Date: Mon, 1 Mar 2021 13:46:26 -0800 Subject: [PATCH] Incorporate feedback from trevor-scheer --- docs/source/data/errors.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/data/errors.mdx b/docs/source/data/errors.mdx index 2a15d9eafa4..d4ee7aeef8d 100644 --- a/docs/source/data/errors.mdx +++ b/docs/source/data/errors.mdx @@ -197,7 +197,7 @@ const typeDefs = gql` const resolvers = { Query: { userWithID: (parent, args, context) => { - if (args.id { - if (args.id { // Don't give the specific errors to the client. - if (err.message.startsWith("Database Error: ")) { + if (err.message.startsWith('Database Error: ')) { return new Error('Internal server error'); } @@ -370,7 +370,7 @@ The error instance received by `formatError` (a `GraphQLError`) contains an `ori }, ``` -> To make context-specific adjustments to the error received by `formatError` (such as localization or personalization), consider [creating a plugin](../integrations/plugins/) that uses the `didEncounterErrors` lifecycle event to attach additional properties to the error. These properties can be accessed from `formatError`. +> To make context-specific adjustments to the error received by `formatError` (such as localization or personalization), consider [creating a plugin](../integrations/plugins/) that uses the [`didEncounterErrors` lifecycle event](../integrations/plugins/#didencountererrors) to attach additional properties to the error. These properties can be accessed from `formatError`. ### For Apollo Studio reporting