Open athkalia opened 8 years ago
Note:
In their json respond api here http://openweathermap.org/current#current_JSON there's no "gust" field at all ! Maybe you should just remove that ?
Cheers
@athkalia So this is still an issue. How did you deal with it?
I made a fork that catches all exceptions and forwards them accordingly in the already existing onError listeners. It's this one. https://github.com/athkalia/WeatherLib . This is the only change: https://github.com/athkalia/WeatherLib/commit/44a43e0b5c339e820521bdf538883733f38906fe
The same problem happens to me! How can I handle this?
Hello, I am getting a NullPointerException from your library. Unfortunately the code is obfuscated so I can't trace it down 100%
Edit:
We are getting the exception because the response is a weird openweathermap response, error 401 that can't be parsed by your library. The easiest way to fix this is to catch NullpointExceptions and return an empty weather object.
The json we receive is: {"cod":401, "message": "Invalid API key. Please see http://openweathermap.org/faq#error401 for more info."}