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