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

Areeb Siddiqui notifications at github.com
Wed Jan 21 15:34:42 UTC 2026


SykoDaedalus left a comment (openstreetmap/openstreetmap-website#6724)

> > Perhaps we should always read the response text if it isn't OK and pass it together with the status and status text down to the `.catch` section?
> 
> I was trying to do that before changing tests. But I guess reading the response if itsn't ok and converting to json will again cause the wierd parsing error? Or maybe I am understanding it wrong 🤷‍♂️

Maybe I understand what you are trying yo say, but I have some confusion. Like will overpass send "meaningful" data if request is not ok and if yes then probably we will have to make a separate render function to display it which we can also use it the `then` block?

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

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


More information about the rails-dev mailing list