Error return from api STREAMED

Hi

I’m building a package to use the route optimization API

I’ve built what appears to be valid request in JSON but all I get back is a 400 error with the message STREAMED.

Does anybody know what this means?

Jules

I am trying to help. For that, I followed the steps:

  1. Enter URL GitHub - graphhopper/graphhopper: Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.;
  2. Searched org:graphhopper STREAMED;
  3. Found nothing relevant to report

This seems a very mysterious case.

Hi

Turned out I had a wrong header.

Now getting this error

SDK error: Graphhopper API error return: , Code: 400, com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of java.util.HashMap (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value (‘{“vehicles”:[{“vehicle_id”:“vehicle-1”,“type_id”:“vehicle_type-2”,“start_address”:{“location_id”:“depot-2”,“lon”:-0.1262901,“lat”:50.876786,“name”:“Shop lovely”,“curbside”:“any”},“end_address”:{“location_id”:“depot-1”,“lon”:-0.1416648,“lat”:50.836956,“name”:“Main depot Brighton”,“curbside”:“any”},“break”:{“earliest”:1682681400,“latest”:1682685000,“duration”:3600},“return_to_depot”:true,“earliest_start”:1682667000,“latest_end”:1682695800}],“vehicle_types”:[{“type_id”:“vehicle_type-2”,“profile”:“car”,“capacity”:[“0”],“speed_factor”:1,“service_time_factor”:1,“network_data_provider”:“openstreetmap”}],“shipments”:[{“id”:“shipment-45”,“pickup”:{“address”:{“location_id”:“depot-1”,“lon”:-0.1416648,“lat”:50.836956,“curbside”:“any”},“duration”:30},“delivery”:{“address”:{“location_id”:“shipment_location-45”,“lon”:-0.1417622,“lat”:50.8229524,“curbside”:“any”},“duration”:120},“priority”:2},{“id”:“shipment-46”,“pickup”:{“address”:{“location_id”:“depot-1”,“lon”:-0.1416648,“lat”:50.836956,“curbside”:“any”},“duration”:30},“delivery”:{“address”:{“location_id”:“shipment_location-46”,“lon”:-0.1474188,“lat”:50.823528,“curbside”:“any”},“duration”:120},“priority”:2},{“id”:“shipment-47”,“pickup”:{“address”:{“location_id”:“depot-1”,“lon”:-0.1416648,“lat”:50.836956,“curbside”:“any”},“duration”:30},“delivery”:{“address”:{“location_id”:“shipment_location-47”,“lon”:-0.1489738,“lat”:50.8248004,“curbside”:“any”},“duration”:120},“priority”:2}],“objectives”:[{“type”:“min”,“value”:“transport_time”}],“configuration”:{“routing”:{“calc_points”:true,“network_data_provider”:“openstreetmap”,“curbside_strictness”:“soft”,“fail_fast”:true,“snap_preventions”:[“motorway”,“trunk”,“bridge”,“ford”,“tunnel”,“ferry”]}}}’) at [Source: (String)“”{"vehicles":[{"vehicle_id":"vehicle-1","type_id":"vehicle_type-2","start_address":{"location_id":"depot-2","lon":-0.1262901,"lat":50.876786,"name":"Shop lovely","curbside":"any"},"end_address":{"location_id":"depot-1","lon":-0.1416648,"lat":50.836956,"name":"Main depot Brighton","curbside":"any"},"break":{"earliest":1682681400,"latest":1682685000,"duration":3600},"return_to_depot":true,"earliest_start":1682667000,"latest_end":168269580"[truncated 1451 chars]; line: 1, column: 1]

Jules

Turned out was accidentally doing json encoding twice :frowning:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.