wego icon indicating copy to clipboard operation
wego copied to clipboard

Is it possible to consider handling three-party errors more elegantly

Open cold-bin opened this issue 1 year ago • 2 comments

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."}

cold-bin avatar Nov 25 '23 01:11 cold-bin