e8ece874b111411b710a3beb0a489843f546a546
Neither CurrentWeather nor geocodeOne checked resp.StatusCode, so a non-200 forecast reply decoded into a zero-value struct reported as a real 0-degree answer, and a non-200 geocode reply decoded into an empty result list and was reported as ErrLocationUnknown — blaming the owner for a service outage. Both now check http.StatusOK first, matching the sibling kiwix and websearch clients, and return a wrapped error naming the status instead. Adds httptest coverage for a 500 from the forecast endpoint, a 500 from the geocode endpoint, and a genuine empty geocode result, asserting each takes a different path.
Description
No description provided
Languages
Go
97.1%
HTML
0.9%
Shell
0.6%
CSS
0.5%
Makefile
0.3%
Other
0.6%