Skip to content

fix: Add missing GraphQL error message fragments for repo components#4024

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/graphql-error-fragments
Open

fix: Add missing GraphQL error message fragments for repo components#4024
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/graphql-error-fragments

Conversation

@sentry

@sentry sentry Bot commented Jul 7, 2026

Copy link
Copy Markdown

Description

This PR addresses a ZodError that occurred when attempting to access the components page (/:provider/:owner/:repo/components) for a non-existent or inaccessible repository.

The root cause was that the GraphQL query in useComponentsBackfilled.tsx did not explicitly request the message field for NotFoundError and OwnerNotActivatedError types. However, the corresponding Zod schemas (RepoNotFoundErrorSchema and RepoOwnerNotActivatedErrorSchema) expected this message field to be present. When the API returned a NotFoundError or OwnerNotActivatedError without a message field, Zod validation failed, leading to the ZodError.

Code Example

... on NotFoundError { message }
... on OwnerNotActivatedError { message }

Notable Changes

The fix involves updating the GraphQL query in src/services/repo/useComponentsBackfilled.tsx to include ... on NotFoundError { message } and ... on OwnerNotActivatedError { message } fragments. This ensures that the message field is fetched from the API when these error types are returned, allowing Zod to correctly validate the response and enabling the application to handle these errors gracefully.

Screenshots

Link to Sample Entry

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 GAZEBO-181Y

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.74%. Comparing base (dbe5f60) to head (4c33949).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4024   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files         831      831           
  Lines       15196    15196           
  Branches     4378     4378           
=======================================
  Hits        15005    15005           
  Misses        184      184           
  Partials        7        7           
Files with missing lines Coverage Δ
src/services/repo/useComponentsBackfilled.tsx 100.00% <ø> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.37% <ø> (ø)
Services 99.33% <ø> (ø)
Shared 98.96% <ø> (ø)
UI 99.01% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbe5f60...4c33949. Read the comment docs.

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 242 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 5.88MB 121 bytes (0.0%) ⬆️
gazebo-production-esm 5.96MB 121 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-production-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js 121 bytes 719.74kB 0.02%

Files in assets/index-legacy.*.js:

  • ./src/services/repo/useComponentsBackfilled.tsx → Total Size: 3.03kB
view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js 121 bytes 642.43kB 0.02%

Files in assets/index.*.js:

  • ./src/services/repo/useComponentsBackfilled.tsx → Total Size: 3.03kB

@codecov-notifications

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #4024   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files         831      831           
  Lines       15196    15196           
  Branches     4370     4370           
=======================================
  Hits        15005    15005           
  Misses        184      184           
  Partials        7        7           
Files with missing lines Coverage Δ
src/services/repo/useComponentsBackfilled.tsx 100.00% <ø> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.37% <ø> (ø)
Services 99.33% <ø> (ø)
Shared 98.96% <ø> (ø)
UI 99.01% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbe5f60...4c33949. Read the comment docs.

@codecov-public-qa

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.74%. Comparing base (dbe5f60) to head (4c33949).

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #4024   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files         831      831           
  Lines       15196    15196           
  Branches     4378     4370    -8     
=======================================
  Hits        15005    15005           
  Misses        184      184           
  Partials        7        7           
Files with missing lines Coverage Δ
src/services/repo/useComponentsBackfilled.tsx 100.00% <ø> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.37% <ø> (ø)
Services 99.33% <ø> (ø)
Shared 98.96% <ø> (ø)
UI 99.01% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbe5f60...4c33949. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codecov-releaser

Copy link
Copy Markdown
Collaborator

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
4c33949 Tue, 07 Jul 2026 21:17:07 GMT Cloud Enterprise

@codecov-qa

codecov-qa Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.74%. Comparing base (dbe5f60) to head (4c33949).

@@           Coverage Diff           @@
##             main    #4024   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files         831      831           
  Lines       15196    15196           
  Branches     4378     4370    -8     
=======================================
  Hits        15005    15005           
  Misses        184      184           
  Partials        7        7           
Files with missing lines Coverage Δ
src/services/repo/useComponentsBackfilled.tsx 100.00% <ø> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.37% <ø> (ø)
Services 99.33% <ø> (ø)
Shared 98.96% <ø> (ø)
UI 99.01% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbe5f60...4c33949. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant