Skip to content

- test + fix for nil response#24

Merged
mattkasun merged 3 commits intodevilcove:masterfrom
sarff:runterrfix
Sep 17, 2025
Merged

- test + fix for nil response#24
mattkasun merged 3 commits intodevilcove:masterfrom
sarff:runterrfix

Conversation

@sarff
Copy link
Contributor

@sarff sarff commented Sep 16, 2025

Fix nil pointer dereference in error handling

replace %w with %v for ErrHttpClient{Message}

- replace %w with %v for ErrHttpClient{Message}
@mattkasun
Copy link
Contributor

what problem does this solve?

@sarff
Copy link
Contributor Author

sarff commented Sep 17, 2025

fixes a nil pointer dereference panic in GetResponse and GetJSON.
Previously, when GetResponse returned nil (invalid URL or JSON marshal error), the code tried to dereference *response, causing a runtime paniс

Co-authored-by: Matthew R Kasun <mkasun@gmail.com>
Co-authored-by: Matthew R Kasun <mkasun@gmail.com>
@mattkasun mattkasun merged commit 316d856 into devilcove:master Sep 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants