Location |
This can happen if you request data for a weather station that is "inactive", as explained further below.
In theory this can also happen if you request data for a GeographicLocation for which the API is unable to find an active weather station, but in practice this shouldn't occur because the global grid stations in our system can provide data for every location on Earth.
An inactive station is one that has not sent any usable weather reports for roughly 10 days or more (10 being an approximate number that is subject to change).
Some stations have never reported valid temperatures, and so have always been inactive/not supported.
It's fairly rare for active stations to go inactive, but it does happen, and it's best to be prepared for the possibility, particularly if you're handling data from hundreds or thousands of locations. Stations can be taken down, they can break (and not be fixed in a timely manner), or they can be moved to another location and assigned a new ID. Unfortunately not even the best airport stations managed by organizations such as the NWS or UK Met Office are exempt from these sorts of problems.
Short periods of station inactivity should not result in this failure. Up to a point, the API will fill in missing data with estimates. It's only when a station fails to send any usable data for roughly 10 days or more that the API will consider it inactive. (10 being an approximate number that is subject to change.)
It's possible for an inactive station to become active (again) at some point in the future. However, if you get this failure for a station, you're probably best off finding another nearby station to use as an alternative/replacement (e.g. by requesting data using the GeographicLocation of the real-world building of interest).