thegreenwebfoundation / co2.js

An npm module for accessing the green web API, and estimating the carbon emissions from using digital services
Other
389 stars 49 forks source link

Added basic error handling to data fetch in emissions script #221

Open dsubject opened 1 month ago

dsubject commented 1 month ago

Triage

Type of change

Please select any of the below items that are appropriate.

This pull request:

Related issue/s

Please list below any issues this pull request is related to.

Docs changes required

Do any changes made in this pull request require parts of the CO2.js documentation to be updated?

If you answered "Yes", please create an corresponding issue in our Developer Documentation repository.

Describe the changes made in this pull request

As clearly as possible, describe the changes made in the pull request. You should at least detail "what changes have been made" and "what the results of these changes will be".

This pull request adds error handling to the script that generates average CO2 emissions data for each country. The changes made are as follows: