[openstreetmap/openstreetmap-website] Check response.ok before parsing JSON in query tool (PR #6724)

Marwin Hochfelsner notifications at github.com
Wed Jan 21 17:56:30 UTC 2026


@hlfan commented on this pull request.



> +        const status = response.statusText || response.status;
+
+        throw new Error(status);

I don't think there's a need for making an extra var for that then.

```suggestion
        throw new Error(response.statusText || response.status);
```

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

Message ID: <openstreetmap/openstreetmap-website/pull/6724/review/3688621850 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260121/4a8c29c3/attachment.htm>


More information about the rails-dev mailing list