apis-is / apis

Making data readily available to anyone interested
https://apis.is
MIT License
162 stars 64 forks source link

fix(weather): fix handling of emptry replies from vedur.is #478

Closed MiniGod closed 5 years ago

MiniGod commented 5 years ago

We keep getting errors in production and the server keeps crashing and restarting. I hope this fixes it. No added tests cause phuket

The error was that we got empty xml replies from vedur.is, like <observations></observations>, while the code simply assumed the <station> to be present inside of it, which then threw an error (for example line 247 in old code).

Although they're already closed, I think this fixes #362, #361, #360, #354 and #353.