Green-Software-Foundation / carbon-ci

[!important] Archived Project This project is archived and is no longer being run inside the Green Software Foundation. Releases are *NOT* maintained or improved. This project cannot be reactivated.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Incorrect handling of missing carbon rate provider

Willmish opened this issue · comments

Program crashes if incorrect WattTime credentials

Currently the program crashes with a runtime error invalid memory address or nil pointer dereference if the WattTime credentials are incorrect or missing.

Program continues without notifying the user when Electricitymap credentials missing/incorrect

If the credentials are missing, it will return a 0 as if that was the actual value.

Alternate handling for both cases

Gracefully handle the error (e.g. using defer, panic and recover mechanism) for WattTime credentials. Raise an error in GitHub Action (using core.setFailed()), to notify that the credentials are missing/incorrect.

Add identifying of missing credentials for Electricitymap, and handle them likewise.