Allow developers to define custom errors for UnauthorizedError #1373
EmirBoyaci
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @MichalLytek,
Is it possible to allow developers to define custom errors for UnauthorizedError? Because, at the moment when user is not allowed to typegraphql throws UnauthorizedError which extended from the built-in Error class. I'm believing that Apollo is automatically returns error code as INTERNAL_SERVER_ERROR if you don't extend your custom error from ApolloError (as defined here). It would be nice to have so that we can pass our custom class for UnauthorizedError.
Beta Was this translation helpful? Give feedback.
All reactions