INTERNAL_SERVER_ERROR is thrown when mutation variables are of invalid type #3361
Labels
🍐 error-handling
Pertaining to error handling (or lack thereof), not just for just general errors/bugs.
I guess this issue is related to #1410 and #2204.
The problem occurs in the package apollo-server at version 2.8.2.
An error being thrown inside the scalar evaluation code is being treated like an INTERNAL_SERVER_ERROR, when in fact it should be treated like a GRAPHQL_VALIDATION_FAILED or something like that. This issue occurs when dealing with variables in the graphql query/mutation. Somehow, the value of the variable manages to pass through schema validation and ends up causing trouble further up.
Here is a reproduction on CodeSandbox
Although my code is a little bit more complex than the example I cooked up in CodeSandbox, I think it shows the nature of the problem.
I really hope this get solved.
Thank you guys, you're awesome!
The text was updated successfully, but these errors were encountered: