Skip to content

Conversation

anasahhm
Copy link

This PR addresses issue #1548
The displayCarbonUsage function now checks for missing carbonIntensity and fossilFuelPercentage values before using them. This prevents runtime errors when the CO₂ Signal API returns incomplete data.
-Added null-safe checks with early throw for missing data
-Added fallback UI message (“Data unavailable”)
-Added console warnings for debugging

The displayCarbonUsage function now includes null-safe checks to prevent runtime errors when CO₂ Signal API data is missing. Added user-facing fallback text and console warnings.
@anasahhm
Copy link
Author

@microsoft-github-policy-service agree

@anasahhm
Copy link
Author

Please address this PR .

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