ECCC-MSC / msc-pygeoapi

MSC OGC API pygeoapi deployment
MIT License
16 stars 25 forks source link

Can't query API with properties set anymore? Returns 500 #309

Closed tristan-morris closed 12 months ago

tristan-morris commented 1 year ago

Thanks for having this project open! I think it's no longer possible to reduce the data returned from the API using the properties field. Just looking at the changes and it doesn't appear intentional, but might be linked to data being loaded in? Possibly 2ce173f31201ec5fd349203cf92f6ed08a1e7fbb, but purely based on the timing.

Queries such as GET https://api.weather.gc.ca/collections/swob-realtime/items?f=json&lang=en-CA&limit=10&properties=air_temp would have succeeded a few days ago, but now fail with 500. I can successfully query the API with the properties constraint omitted.

tomkralidis commented 1 year ago

Thanks for the report. This appears to be a data issue. We are investigating and will report back. Thanks.

tomkralidis commented 1 year ago

Update: there was a data issue on some observations not reporting air_temp. Given that the collection is a rolling 30 day period of observations, this should resolve itself over time. In the meantime, we are working on strategies to handle core observed properties to prevent this issue in the future. The workaround suggested (i.e. removing properties= from the above query) will work, albeit with a larger payload.

Having said this, we've also made a software update to safeguard and provide the user an error message (vs a 500), which will be put forth as part of the next msc-pygeoapi release.

tristan-morris commented 12 months ago

Hi @tomkralidis. Thanks for confirming the issue and for the extra detail which allowed me to work around the problem.

I think there might be a separate API / doman problem now, but will keep an eye on that and see if it resolves.