[openstreetmap/openstreetmap-website] PUT /api/0.6/gpx/:id causes HTTP 500 Internal Server Error (Issue #4821)

Joan Maspons notifications at github.com
Tue May 21 15:47:34 UTC 2024


### URL

_No response_

### How to reproduce the issue?

While testing the R implementations of OSM API ([osmapiR](https://github.com/jmaspons/osmapiR)) I get a server error:
```r
library(osmapiR)
gpx_path <- system.file("extdata", "St_Geroni.gpx", package = "osmapiR")
gpx_id <- osm_create_gpx(
  file = gpx_path,
  description = "Test create gpx with osmapiR.",
  tags = c("testing", "osmapiR")
)

gpx_upd_path <- system.file("extdata", "St_Geroni_70nodes.gpx", package = "osmapiR")
upd_trace <- osm_update_gpx(gpx_id = gpx_id, file = gpx_upd_path)
#> ! HTTP 500 Internal Server Error.
#> • The server encountered an internal error or
#> misconfiguration and was unable to complete
#> your request.
#> • Please contact the server administrator at
#>  webmaster at openstreetmap.org to inform them of the time this error occurred,
#>  and the actions you performed just before this error.
#> • More information about this error may be available
#> in the server error log.
```
The problematic API call is the `PUT https://api.openstreetmap.org/api/0.6/gpx/:gpx_id`
The body of the call is a gpx file:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" version="1.1" creator="togpx">
  <metadata>
    <desc>Ruta circular des del Bruc a Sant Geroni, Montserrat</desc>
    <author>
      <name>Joan Maspons</name>
      <email id="joanmaspons" domain="gmail.com"/>
    </author>
    <copyright author="Joan Maspons">
      <year>2024</year>
      <license>http://opendatacommons.org/licenses/odbl/1.0</license>
    </copyright>
    <keywords>test file</keywords>
    <time>2024-05-21T12:02:27.755498390Z</time>
    <bounds minlat="41.5918039" minlon="1.7722108" maxlat="41.6128596" maxlon="1.7957907"/>
  </metadata>
  <trk>
    <name>El Bruc Trail Running</name>
    <desc>name=El Bruc Trail Running
time=1970-01-01T00:06:00.000Z</desc>
    <trkseg>
      <trkpt lat="41.59214297309518" lon="1.7731868382543325">
        <ele>575.7999877929688</ele>
        <time>1970-01-01T00:06:00.000Z</time>
      </trkpt>
      <trkpt lat="41.59229166805744" lon="1.7744414415210485">
        <ele>569.7999877929688</ele>
        <time>1970-01-01T00:06:54.000Z</time>
      </trkpt>
...
      <trkpt lat="41.596007784828544" lon="1.7722107656300068">
        <ele>617</ele>
        <time>1970-01-01T01:23:30.000Z</time>
      </trkpt>
      <trkpt lat="41.59213869832456" lon="1.773126320913434">
        <ele>576.2000122070312</ele>
        <time>1970-01-01T01:26:16.000Z</time>
      </trkpt>
    </trkseg>
  </trk>
</gpx>
```

### Screenshot(s) or anything else?

_No response_

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/4821
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/4821 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240521/9a0d9615/attachment-0001.htm>


More information about the rails-dev mailing list