[openstreetmap/openstreetmap-website] Make Moderation Zone Note Error more user friendly (PR #7373)

Tom Hughes notifications at github.com
Tue Sep 8 21:01:02 UTC 2026


@tomhughes commented on this pull request.

The change to the test should be in the same commit that changes the error.

I would probably split things so the javascript change to improve the error formatting is one commit and the change to the message is a second commit.

> @@ -19,9 +19,10 @@ export default function (map) {
         text
       })
     })
-      .then(resp => {
+      .then(async resp => {

Why does this need an `async` where it didn't before? There don't seem to be any significant changes to what it's doing?

> @@ -29,7 +29,7 @@ def status
   end
 
   class APIModerationZoneError < APIAccessDenied
-    def initialize(message = "You don't have permissions to make changes in this zone, as it is currently protected by moderators")
+    def initialize(message = "You don't have permissions to make changes here. Please either sign in or create an OpenStreetMap account")

The problem with this is that it makes the error specific to the current use of moderation zones to restrict anonymous notes but it's likely they will be expanded to other things where this description would not be accurate.

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

Message ID: <openstreetmap/openstreetmap-website/pull/7373/review/5146933364 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260908/aadd569b/attachment.htm>


More information about the rails-dev mailing list