wego
wego copied to clipboard
Is it possible to consider handling three-party errors more elegantly
problem I meet: 2023/11/25 09:36:44 Failed to fetch weather data: Unable to unmarshal response (http://api.openweathermap.org/data/2.5/forecast?zip=106.607 29.531&appid=a2d79c2afdb849ba90baa1b254f52ca3&units=metric&lang=en): json: cannot unmarshal number into Go struct field openWeatherResponse.cod of type string The json body is: {"cod":401, "message": "Invalid API key. Please see https://openweathermap.org/faq#error401 for more info."}