INTERNAL_SERVER_ERROR when variable is missing

Hi guys! I’m facing a problem with the validation. When i send a request with invalid input/invalid input property, i receive the error INTERNAL_SERVER_ERROR, instead of the correct one.

Is there some config for that?

What version of Apollo Server are you running?

Doe your server log anything to its console?

Hi. @apollo/server 4.0., and my server also don’t log anything

In my testing i found something: Using apollo-server-express (v3), i got the expected result

Looks like a regression in AS4? Filing an issue at GitHub - apollographql/apollo-server: 🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more. would be great.

There are two places in AS4 where an “Internal server error” with just that message is thrown. One is if an unexpected error is thrown anywhere within the execution of an operation (eg, some sort of bug in our code, or a plugin unexpectedly throws). But that should usually come with a more detailed error logged to your logger (eg the console).

The other is if you have a formatError hook and it throws. (Hmm, we should fix this to also log the formatting error instead of just swallowing it.)

Do you set either the logger or formatError options to new ApolloServer()?