MapComplete
MapComplete copied to clipboard
Have a popup or some other indicator to show that OSM is down for maintenance atm
Otherwise people might think the tool is broken, while it's just osm that's down.
For this, I'd need an API indicating the status.
Would you mind asking if and where such an API is to the engineering team over here?
Seems like they just want applications to rely on the error messages.
They do say that HTTP response codes do come with human-readable message, which could be shown to user without too much work.
On advanced side, https://wiki.openstreetmap.org/wiki/Platform_Status mentions several resources like http://uptime.openstreetmap.org/ which should show if OSM API or tiles services are down (and it seems to use third-party which has API available https://www.statuscake.com/api/v1/)
I didn't know osm had an uptime page. Btw, that info page is provided by Statuscake, which does on it's own have an api: https://www.statuscake.com/api/
It's not exactly trivial to extract some relevant information out of statuscake, as there are so many different services and endpoints. Without specific knowledge what is needed for your use case, this is pretty difficult to accomplish. Of course, those monitoring settings are subject to change over time, and you'd have to keep your statuscake API calls up-to-date all the time. Good luck with that.
Then of course statuscake won't check if your app is able to log in, or create a new changeset or upload any data. Besides the OSM endpoints listed on statuscake, there are tons of other potential issues that may impact your app, such as network connectivity issues, etc.
I'd say, without some kind of local storage and error handling in your app, this will all pretty futile.
Just came across this somewhat related discussion with JOSM: https://josm.openstreetmap.de/ticket/22138
This can be mimicked by using uMatrix. Note that, if the OSM-API-tilefetcher is enabled, the application will loop and hang the browser.
NB: We typically only consider endpoints underneath api.openstreetmap.org to be part of the osm api. Tiles are served by another url, therefore are not part of the osm api.