Skip to content

fix(http): return early on request errors to prevent nil pointer panic - #672

Merged
msafwankarim merged 1 commit into
stakater:masterfrom
AruneshDwivedi:fix/http-client-nil-panic
Jul 29, 2026
Merged

fix(http): return early on request errors to prevent nil pointer panic#672
msafwankarim merged 1 commit into
stakater:masterfrom
AruneshDwivedi:fix/http-client-nil-panic

Conversation

@AruneshDwivedi

Copy link
Copy Markdown
Contributor

RequestWithHeaders continued executing after http.NewRequest and http.DefaultClient.Do errors, dereferencing nil response. Returns StatusInternalServerError early instead of panicking.

Fixes #635

RequestWithHeaders continued executing after http.NewRequest and
http.DefaultClient.Do errors, dereferencing nil response and causing
controller panics when external APIs drop connections.

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
@msafwankarim msafwankarim added the ok-to-test Run tests in PR workflows label Jul 10, 2026
@msafwankarim
msafwankarim merged commit b31dca6 into stakater:master Jul 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Run tests in PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] The controller panics when UptimeRobot's API suddently drop the connexion

2 participants