WeatherKit REST API parameter validation inconsistency

The status codes returned for REST API queries give a good indication of the issue encountered. Generally:

200 is good
400 means you've passed in bad or incomplete parameters
401 is an authentication issue

However, there's a parameter validation inconsistency on the availability endpoint.

If you pass in out-of-range coordinates to the weather endpoint, you get the expected 400 response code.

But if you pass bad coordinates to the availability endpoint, it blows up and returns a 500 (internal server error).

I've got code that can deal with this response, but it would be much better to know exactly where the problem lies. 500 tells me there's an issue on the server that's out of my control...

Thank you for reporting this.

WeatherKit REST API parameter validation inconsistency
 
 
Q