carbon-ci icon indicating copy to clipboard operation
carbon-ci copied to clipboard

Bug: Incorrect handling of missing carbon rate provider

Open Willmish opened this issue 3 years ago • 0 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.

Willmish avatar Jul 11 '22 13:07 Willmish