-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Do not throw Forbidden error but log as warning #2383
Comments
Some extra context: |
Hi, we also use Sentry and we simply don't capture 'Forbidden' messages using an Apollo plugin. Check: https://beta-docs.vendure.io/reference/typescript-api/configuration/api-options/#apolloserverplugins Here is an example of how to do it
|
Thanks for the alternative solution Alexis! That would be a good way to solve it if it were to remain an error. I agree with Martijn that a Forbidden error is a client induced error. Like the HTTP 403 Forbidden error. So from my perspective the server shouldn't throw an error in the first place. Hence this feature request. |
Agreed. In v2.1 this should be downgraded to a warning. |
Closes #2383. Since this error occurs in expected circumstances, it should not be logged at the error level.
Is your feature request related to a problem? Please describe.
At the moment we are using Sentry for logging / monitoring Vendure errors. We see the Forbidden errors also being logged to Sentry.
Describe the solution you'd like
We could filter those errors out in Sentry but we think forbidden should not throw an error but can be logged as a warning instead, since it's expected behaviour.
Describe alternatives you've considered
Filtering Forbidden errors out in Sentry.
The text was updated successfully, but these errors were encountered: