throw from resolver should not be logged
See original GitHub issue@steida commented on Mon Feb 26 2018
Maybe I am wrong, but
const throwError = (error /*: ServerError */) => {
throw new Error(JSON.stringify(error));
};
const throwNotAuthorizedError = () => throwError({ type: 'notAuthorized' });
Seems to be a recommended way how to stop resolver, but then probably this should not be logged.
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (2 by maintainers)
Top Results From Across the Web
throw from resolver should not be logged · Issue #199 - GitHub
@johannpinson Hi, how do you manage to make the error response log disappears? I tried the following: import {ApolloError} from 'apollo-server-errors'; // and ......
Read more >Error handling - Apollo GraphQL Docs
Throwing errors For example, it throws a GRAPHQL_VALIDATION_FAILED error whenever an incoming operation isn't valid against the server's schema. Your resolvers ...
Read more >Why is "log and throw" considered an anti-pattern? [closed]
The cross-cutting concerns argument is basically that it is a waste of time handling errors that don't concern you. Far better to let...
Read more >Resolve or Die - Error Handling Strategies for Loading Data in ...
If you are using a Route Resolver, and it encounters an unhandled exception, the route will not resolve, and your page will simply...
Read more >Handling GraphQL errors like a champ with unions and ...
No type error will be thrown if you mistype the error message or extension code inside your resolvers. The GraphQL engine does not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@marktani if you still facing this problem you need to add
debug: false
in start options@timsuchanek @divyenduz can you describe a couple of approaches here?