[openstreetmap/openstreetmap-website] Handle html error message for map xml export (PR #6284)

Marwin Hochfelsner notifications at github.com
Sun Aug 3 09:29:52 UTC 2025


@hlfan commented on this pull request.



> @@ -52,7 +52,20 @@
         }
       };
     }
+
+    static getHtmlResponseHandler(event) {
+      const response = event.detail.fetchResponse.response;
+      const contentType = response.headers.get("content-type");
+
+      if (!response.ok && contentType?.includes("text/html")) {
+        // Prevent Turbo from replacing the current page with an error HTML response
+        // from the image export endpoint

```suggestion
        // from the export endpoint
```

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

Message ID: <openstreetmap/openstreetmap-website/pull/6284/review/3082077264 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250803/27183004/attachment.htm>


More information about the rails-dev mailing list