pietervdvn / MapComplete

An easy-to-use webapp to edit OpenStreetMap
https://mapcomplete.org
212 stars 91 forks source link

Have a popup or some other indicator to show that OSM is down for maintenance atm #880

Closed thibaultmol closed 1 year ago

thibaultmol commented 2 years ago

Otherwise people might think the tool is broken, while it's just osm that's down.

pietervdvn commented 2 years ago

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?

thibaultmol commented 2 years ago

Seems like they just want applications to rely on the error messages.

mnalis commented 2 years ago

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/)

thibaultmol commented 2 years ago

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/

mmd-osm commented 2 years ago

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.

mmd-osm commented 2 years ago

Just came across this somewhat related discussion with JOSM: https://josm.openstreetmap.de/ticket/22138

pietervdvn commented 2 years ago

This can be mimicked by using uMatrix. Note that, if the OSM-API-tilefetcher is enabled, the application will loop and hang the browser.

mmd-osm commented 2 years ago

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.