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.