You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, when an anonymous user submitted a GraphQL query that attempted to query a non-existent field (e.g., `foo` on `CoverageAnnotation`), the `GraphQLError` generated was incorrectly treated as an internal server error. This led to unnecessary logging as "GraphQL internal server error" and capture by Sentry.
The error_formatter in apps/codecov-api/graphql_api/views.py has been updated. The condition if debug or (not is_anonymous and is_bad_query): was modified to if debug or is_bad_query:. This ensures that any GraphQLError containing "Cannot query field" is correctly identified as a client-side schema validation error, regardless of whether the user is authenticated or anonymous. Such errors will now be returned directly to the client as a standard GraphQL error, without being logged as a server fault or sent to Sentry.
Legal Boilerplate
Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.
This PR simplifies the error_formatter condition in apps/codecov-api/graphql_api/views.py from if debug or (not is_anonymous and is_bad_query): to if debug or is_bad_query:, so that "Cannot query field" schema-validation errors from anonymous users are returned to the client as normal GraphQL errors instead of being masked as INTERNAL SERVER ERROR, logged, and sent to Sentry. The change is correct, low-risk, and matches its description; these errors only reveal schema field names, which are already exposed via GraphQL introspection.
Seer wants to keep iterating on this pull request to get CI passing, but the Sentry GitHub App installation is missing permissions it needs to read the failing checks and push a fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
error_formatterinapps/codecov-api/graphql_api/views.pyhas been updated. The conditionif debug or (not is_anonymous and is_bad_query):was modified toif debug or is_bad_query:. This ensures that anyGraphQLErrorcontaining "Cannot query field" is correctly identified as a client-side schema validation error, regardless of whether the user is authenticated or anonymous. Such errors will now be returned directly to the client as a standard GraphQL error, without being logged as a server fault or sent to Sentry.Legal Boilerplate
Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.
Fixes API-F08
This PR was automatically generated by Sentry. You can adjust this setting at any time.