Skip to content

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

Open
AruneshDwivedi wants to merge 1 commit into
stakater:masterfrom
AruneshDwivedi:fix/http-client-nil-panic
Open

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

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

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
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