CICCIOSGAMINO / openweather-apis

Simple APIs for OpenWeatherMap.org basic services
GNU General Public License v3.0
44 stars 27 forks source link

getTemp throws error when invalid API Key is used #30

Closed mastasky closed 3 years ago

mastasky commented 4 years ago

Since the function tries to access a deeply nested value which doesn't exist, we get an exception which isn't caught and forwarded to the callback.

https://github.com/CICCIOSGAMINO/openweather-apis/blob/71081eff2c84dcce6e8dbc78877639f0266caaae/index.js#L162

Repro:

jemxz commented 4 years ago

This error also occurs when a valid API key is used. Is there a fix to it?

CICCIOSGAMINO commented 4 years ago

I'm working on ...

CICCIOSGAMINO commented 4 years ago

Solved in the next version ... i'll be v5.0.0

jemxz commented 4 years ago

nice

On Wed, Mar 18, 2020 at 1:22 PM Marco Canali notifications@github.com wrote:

Solved in the next version ... i'll be v5.0.0

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CICCIOSGAMINO/openweather-apis/issues/30#issuecomment-600539536, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHUOVLDMJKAAPNDMPID552LRICOGJANCNFSM4J7K4LZA .

bayoudhi commented 3 years ago

Hello guys, I think this issue is already fixed in this merged PR #41