Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTERNAL_SERVER_ERROR is thrown when mutation variables are of invalid type #3361

Closed
fhpriamo opened this issue Oct 1, 2019 · 4 comments
Closed
Labels
🍐 error-handling Pertaining to error handling (or lack thereof), not just for just general errors/bugs.

Comments

@fhpriamo
Copy link

fhpriamo commented Oct 1, 2019

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!

@geovanevital
Copy link

Had the same issue here, did you found any solutions?

Thanks!!

@glasser
Copy link
Member

glasser commented Apr 6, 2021

Duplicate of #3498

@glasser glasser marked this as a duplicate of #3498 Apr 6, 2021
@glasser glasser closed this as completed Apr 6, 2021
@glasser
Copy link
Member

glasser commented Apr 9, 2021

I've released a prerelease with this fix, version 2.23.0-alpha.0. Try out the alpha and see if it works for you! Please provide any feedback in #5094.

@glasser
Copy link
Member

glasser commented Apr 14, 2021

This is released in Apollo Server 2.23.0.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🍐 error-handling Pertaining to error handling (or lack thereof), not just for just general errors/bugs.
Projects
None yet
Development

No branches or pull requests

4 participants