Skip to content

Commit

Permalink
docs: remove extraneous parens from previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
glasser committed Sep 29, 2022
1 parent 9dfe7e1 commit eb04917
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/source/integrations/plugins-event-reference.mdx
Expand Up @@ -270,7 +270,7 @@ const server = new ApolloServer({

plugins: [
{
async startupDidFail(({ error })) {
async startupDidFail({ error }) {
console.log(`Startup failed: ${error}`);
},
},
Expand Down Expand Up @@ -512,7 +512,7 @@ const server = new ApolloServer({

plugins: [
{
async contextCreationDidFail(({ error })) {
async contextCreationDidFail({ error }) {
console.log(`Context creation failed: ${error}`);
},
},
Expand All @@ -536,7 +536,7 @@ const server = new ApolloServer({

plugins: [
{
async invalidRequestWasReceived(({ error })) {
async invalidRequestWasReceived({ error }) {
console.log(`Bad request: ${error}`);
},
},
Expand All @@ -548,7 +548,7 @@ const server = new ApolloServer({

### `unexpectedErrorProcessingRequest`

The `unexpectedErrorProcessingRequest` event fires whenever an "unexpected" error is thrown during request execution. "Unexpected" errors don't include common client data errors such as validation, parsing, or GraphQL execution errors. Instead, an unexpected error indicates a _programming_ error, such as a plugin hook throwing unexpectedly or Apollo Server encountering a bug. No matter the cause, Apollo Server masks this type of error from a client.
The `unexpectedErrorProcessingRequest` event fires whenever an "unexpected" error is thrown during request execution. "Unexpected" errors don't include common client data errors such as validation, parsing, or GraphQL execution errors. Instead, an unexpected error indicates a _programming_ error, such as a plugin hook throwing unexpectedly or Apollo Server encountering a bug. No matter the cause, Apollo Server masks this type of error from a client.

Note this hook is on the top level of the plugin rather than on the object returned from `requestWillStart`, because this hook triggers if `requestWillStart` throws.

Expand All @@ -562,7 +562,7 @@ const server = new ApolloServer({

plugins: [
{
async unexpectedErrorProcessingRequest(({ requestContext, error })) {
async unexpectedErrorProcessingRequest({ requestContext, error }) {
console.log(`Something went wrong: ${error}`);
},
},
Expand Down

0 comments on commit eb04917

Please sign in to comment.