[openstreetmap/openstreetmap-website] Don't display error messages when second scheduled rc command fails (PR #3767)

Anton Khorev notifications at github.com
Tue Oct 25 09:09:45 UTC 2022


If we care about errors when using editors like Potlatch,
rc note loading gives an error in Potlatch anyway because Potlatch doesn't have the `import` command. In case of Potlatch there's no way to check what commands are supported. Potlatch won't even tell that it's Potlatch, unlike JOSM that sends this header: `Server: JOSM RemoteControl`. And we can't assume that it's Potlatch when there's no server header because we don't get to read the response as long as we make cors-avoiding requests (https://github.com/openstreetmap/openstreetmap-website/pull/3760).

The error message that is displayed when the note import fails is not helpful. It tells the user to check if the editor is launched and rc enabled. But we already know that it's the case because otherwise the first (`load_and_zoom`) command would have failed. It's better not to display any message at all in this case.

We can't know if `load_and_zoom` fully worked either. For example, on element pages `load_and_zoom` gets a parameter to select the element. This parameter is ignored by Potlatch and there's no error message about it. It makes sense then not to display the message about a failed note load.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/3767

-- Commit Summary --

  * Don't display error messages when second scheduled rc command fails

-- File Changes --

    M app/assets/javascripts/index.js (14)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/3767.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3767.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3767
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3767 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20221025/d7dc2f76/attachment-0001.htm>


More information about the rails-dev mailing list