-
Notifications
You must be signed in to change notification settings - Fork 1
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
reavealErrorTypes are still logged to Google #6
Comments
Hi @RoelRoel Can you clarify your expected behaviour so I can try to understand the problem better? How I interpret your question at the moment: You would expect that the GraphQL error is not reported in Google Error Reporting because it is part of the If this is your question, the
However, Google monitors your application and GraphQL will throw an exception that will be taken from the Google Error Reporting. If your error is part of the Unfortunately I don't have time to reproduce your case at the moment, I hope my explanation still makes sense to you. |
Thanks for the fast answer. I don't want to log revealed errors because that user mistakes (like typing the wrong password). |
Hi @RoelRoel No, The error is still appearing in Google Error Reporting because all Apollo Errors are Exceptions that are tracked by Google Error Reporting, this plugin does not change that. The purpose of this plugin is to prevent that certain errors are exposed to the client (for example a Browser doing a GraphQL query). Let my try to explain the behaviour with the following example code: https://gist.github.com/philsch/0433a702383bb70dd6143f2bdc48c8c4 This example GraphQL server defines two custom errors, For "some" errorClient: Server:
As you can see, the error is completely revealed to the client. But For "secret" errorClient: Server:
The original error is not visible to the client. As you can see in the last line of the server logs, the |
I checked if the ForbiddenError is from the same module. They are both from 'apollo-server-express'.
When I look at the libraries code it seems pretty straighforward so this is very weird.
The text was updated successfully, but these errors were encountered: