[openstreetmap/openstreetmap-website] Map XML download with Turbo (PR #6255)
mmd
notifications at github.com
Sun Jul 27 09:51:05 UTC 2025
@mmd-osm commented on this pull request.
> + try {
+ detailMessage = event?.detail?.error?.message;
+ if (!detailMessage) {
+ const responseText = await event.detail.fetchResponse.responseText;
+ const parser = new DOMParser();
+ const doc = parser.parseFromString(responseText, "text/html");
+ detailMessage = doc.body ? doc.body.textContent.trim() : "(unknown)";
+ }
+ } catch (err) {
+ detailMessage = "(unknown)";
+ }
+ // eslint-disable-next-line no-alert
+ alert(OSM.i18n.t("javascripts.share.export_failed", { reason: detailMessage }));
+ }
+
+ static getTurboBlobHandler(downloadCallback) {
@hlfan mentioned earlier on _I'd like to have downloadBlob separately to reuse it for the directions geojson download._
So that's why I kept it outside the class for now.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6255#discussion_r2233890105
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6255/review/3059441831 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250727/0d15910d/attachment.htm>
More information about the rails-dev
mailing list