[openstreetmap/openstreetmap-website] Notes API call returning notes that when visiting note in browser, return 500 errors. (Issue #3994)
Will Skora
notifications at github.com
Sat Apr 1 00:00:21 UTC 2023
### URL
https://www.openstreetmap.org/note/849265
### How to reproduce the issue?
Hi,
While editing in JOSM (18699 and 18678), I was downloading data and notes for small areas and several notes appeared in a layer. Some of these notes were valid but some of them had empty contents and when visiting these URLs in the browser, they returned a 500 error.
I checked the terminal, JOSM made these API calls were made to obtain the notes:
```
2023-03-31 10:58:08.564 INFO: GET https://api.openstreetmap.org/api/0.6/notes?limit=1000&closed=7&bbox=-81.4890289,41.2037145,-81.4419937,41.2762584 -> HTTP/1.1 200 (534 ms; 339 B)
2023-03-31 19:34:31.375 INFO: GET https://api.openstreetmap.org/api/0.6/notes?limit=1000&closed=7&bbox=-81.6465148,41.1896413,-81.6446695,41.1905042 -> HTTP/1.1 200 (422 ms; 339 B)
```
Both of these API calls (which appear to be valid API calls per https://wiki.openstreetmap.org/wiki/API_v0.6#Search_for_notes:_GET_/api/0.6/notes/search) return data stating there are open notes in these bounding boxes
The first API call - https://api.openstreetmap.org/api/0.6/notes?limit=1000&closed=7&bbox=-81.4890289,41.2037145,-81.4419937,41.2762584
returns data that states there is an open note with https://www.openstreetmap.org/note/849265
full response of that API call
```
<osm version="0.6" generator="OpenStreetMap server" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
<note lon="-81.4644814" lat="41.2050060">
<id>849265</id>
<url>https://api.openstreetmap.org/api/0.6/notes/849265</url>
<comment_url>
https://api.openstreetmap.org/api/0.6/notes/849265/comment
</comment_url>
<close_url>
https://api.openstreetmap.org/api/0.6/notes/849265/close
</close_url>
<date_created>2017-01-12 05:49:33 UTC</date_created>
<status>open</status>
<comments> </comments>
</note>
</osm>
```
Visiting https://api.openstreetmap.org/api/0.6/notes/849265 returns data stating there is a note but trying to visit that note's URL - https://www.openstreetmap.org/note/849265 it leads to a 500 error.
The second API call https://api.openstreetmap.org/api/0.6/notes?limit=1000&closed=7&bbox=-81.6465148,41.1896413,-81.6446695,41.1905042
returns a note with the status of open, https://www.openstreetmap.org/note/849270 which leads to a 500 error.
**To reproduce:**
1. Visit https://api.openstreetmap.org/api/0.6/notes?limit=1000&closed=7&bbox=-81.6465148,41.1896413,-81.6446695,41.1905042
and
https://api.openstreetmap.org/api/0.6/notes?limit=1000&closed=7&bbox=-81.4890289,41.2037145,-81.4419937,41.2762584
2. Read response, try to obtain the URLs for the notes given the note ids in the responses.
or visit said location of the https://api.openstreetmap.org/api/0.6/notes/849265 -
(e.g. https://www.openstreetmap.org/#map=15/41.2050/-81.4645&layers=N ) - no note appears in the browser.
### Screenshot(s) or anything else?
_No response_
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3994
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/3994 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230331/091af2bf/attachment.htm>
More information about the rails-dev
mailing list