Pix4D / cogito

Concourse resource for GitHub Commit Status and Google Chat notifications
MIT License
34 stars 14 forks source link

When retrying an HTTP request to GitHub, Cogito does not print why #123

Closed marco-m-pix4d closed 1 year ago

marco-m-pix4d commented 1 year ago

With the default log level, in case of retry, Cogito prints:

[INFO]  cogito.put.ghCommitStatus: GitHub HTTP request: attempt=1 max=3
[INFO]  cogito.put.ghCommitStatus: Sleeping for: time=4m47s

At line 2, the user can infer that the attempt at line 1 failed, but the reason (the HTTP status code) is not printed. Instead, we should print the reason, because it would make easier to troubleshoot if needed.