Skip to content

fix(error-boundary): Guard against null data.detail in NetworkErrorBoundary - #4122

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/gazebo-17he-null-detail-error
Open

sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/gazebo-17he-null-detail-error

Conversation

@sentry

@sentry sentry Bot commented Sep 12, 2026

Copy link
Copy Markdown

DescriptionThis PR fixes GAZEBO-17HE, a TypeError: Cannot read properties of null (reading 'detail') that occurred in the NetworkErrorBoundary component.The error happened when an API response for statuses 401, 403, or 429 returned a null body. The description functions for these statuses ((data) => data.detail) would then attempt to access .detail on null, causing a crash.The fix involves adding optional chaining (?.) to these description functions in src/layouts/shared/NetworkErrorBoundary/NetworkErrorBoundary.jsx, changing data.detail to data?.detail. This ensures that if data is null or undefined, the expression safely evaluates to undefined instead of throwing an error, allowing the error UI to render gracefully.# Code Examplejavascript// Before(data) => data.detail// After(data) => data?.detail# Notable Changes- Added optional chaining (?.) to description functions for 401, 403, and 429 status codes in src/layouts/shared/NetworkErrorBoundary/NetworkErrorBoundary.jsx.- Prevents TypeError: Cannot read properties of null (reading 'detail') when API responses for these statuses return a null body.# Screenshots# Link to Sample Entry# Legal BoilerplateLook, 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-17HE

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-production-system 5.82MB 3 bytes (0.0%) ⬆️
gazebo-production-esm 5.89MB 45 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 3 bytes 657.82kB 0.0%

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

  • ./src/layouts/shared/NetworkErrorBoundary/NetworkErrorBoundary.jsx → Total Size: 7.87kB
view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js 45 bytes 577.86kB 0.01%

Files in assets/index.*.js:

  • ./src/layouts/shared/NetworkErrorBoundary/NetworkErrorBoundary.jsx → Total Size: 7.86kB

@sentry

sentry Bot commented Sep 12, 2026

Copy link
Copy Markdown
Author

⚠️ Seer needs additional GitHub permissions

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.

Review and accept the updated permissions to let Seer continue: https://github.com/organizations/codecov/settings/installations/86101127/permissions/update

@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.77%. Comparing base (b8fbfc0) to head (e831e32).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4122   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         823      823           
  Lines       15147    15147           
  Branches     4387     4387           
=======================================
  Hits        14961    14961           
  Misses        179      179           
  Partials        7        7           
Files with missing lines Coverage Δ
...ared/NetworkErrorBoundary/NetworkErrorBoundary.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <100.00%> (ø)
Pages 98.43% <ø> (ø)
Services 99.32% <ø> (ø)
Shared 98.94% <ø> (ø)
UI 99.02% <ø> (ø)

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 b8fbfc0...e831e32. Read the comment docs.

@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    #4122   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         823      823           
  Lines       15147    15147           
  Branches     4387     4387           
=======================================
  Hits        14961    14961           
  Misses        179      179           
  Partials        7        7           
Files with missing lines Coverage Δ
...ared/NetworkErrorBoundary/NetworkErrorBoundary.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <100.00%> (ø)
Pages 98.43% <ø> (ø)
Services 99.32% <ø> (ø)
Shared 98.94% <ø> (ø)
UI 99.02% <ø> (ø)

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 b8fbfc0...e831e32. 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.77%. Comparing base (b8fbfc0) to head (e831e32).

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #4122   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         823      823           
  Lines       15147    15147           
  Branches     4379     4379           
=======================================
  Hits        14961    14961           
  Misses        179      179           
  Partials        7        7           
Files with missing lines Coverage Δ
...ared/NetworkErrorBoundary/NetworkErrorBoundary.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <100.00%> (ø)
Pages 98.43% <ø> (ø)
Services 99.32% <ø> (ø)
Shared 98.94% <ø> (ø)
UI 99.02% <ø> (ø)

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 b8fbfc0...e831e32. 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
e831e32 Sat, 12 Sep 2026 10:55:03 GMT Cloud Enterprise

@codecov-qa

codecov-qa Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.77%. Comparing base (b8fbfc0) to head (e831e32).

@@           Coverage Diff           @@
##             main    #4122   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         823      823           
  Lines       15147    15147           
  Branches     4387     4387           
=======================================
  Hits        14961    14961           
  Misses        179      179           
  Partials        7        7           
Files with missing lines Coverage Δ
...ared/NetworkErrorBoundary/NetworkErrorBoundary.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.72% <100.00%> (ø)
Pages 98.43% <ø> (ø)
Services 99.32% <ø> (ø)
Shared 98.94% <ø> (ø)
UI 99.02% <ø> (ø)

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 b8fbfc0...e831e32. 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