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

Throw specific GraphQL errors #404

Closed
lorensr opened this issue Jul 23, 2018 · 0 comments · Fixed by #1258
Closed

Throw specific GraphQL errors #404

lorensr opened this issue Jul 23, 2018 · 0 comments · Fixed by #1258

Comments

@lorensr
Copy link
Contributor

lorensr commented Jul 23, 2018

I think this type of error should not be classified as an internal server error:

image

It should have code: "UNAUTHENTICATED", which you get by throw new AuthenticationError(). There's also ForbiddenError, UserInputError and custom error types:

https://www.apollographql.com/docs/apollo-server/features/errors.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants