[openstreetmap/openstreetmap-website] Check response.ok before parsing JSON in query tool (PR #6724)
mmd
notifications at github.com
Sun Jan 18 20:21:07 UTC 2026
mmd-osm left a comment (openstreetmap/openstreetmap-website#6724)
We might need to fine tune the exact HTTP status codes to check. Overpass API uses slightly different ones: [link](https://github.com/drolbr/Overpass-API/blob/a0db4f392f744d5e1304331edbf542ef6d6ce2fa/src/overpass_api/frontend/basic_formats.cc#L38-L49). In any case, I would remove HTTP 509 from the list and include 429 instead, for rate limiting.
As a heads up, sometimes Overpass API generates fairly large HTML/XML error responses, which could look a bit odd on the screen when rendered as plain text. Since this is happening rather infrequently, I would wait for more user feedback.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6724#issuecomment-3765705646
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6724/c3765705646 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260118/07e66f90/attachment.htm>
More information about the rails-dev
mailing list