accounts
accounts copied to clipboard
Throw specific GraphQL errors
I think this type of error should not be classified as an internal server error:
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