Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instructions = 'false' returns HTTP 400 #138

Closed
nilsnolde opened this issue Mar 3, 2018 · 5 comments
Closed

instructions = 'false' returns HTTP 400 #138

nilsnolde opened this issue Mar 3, 2018 · 5 comments
Assignees
Milestone

Comments

@nilsnolde
Copy link
Contributor

nilsnolde commented Mar 3, 2018

E.g.
https://api.openrouteservice.org/directions?api_key=key&coordinates=8.34234%2C48.23424%7C8.34423%2C48.26424&profile=driving-car&instructions=false

returns

  "error": {
    "message": "JSONObject[\"segments\"] not found."
  },
  "info": {
    "engine": {
      "version": "4.5.0",
      "build_date": "2018-02-27T14:20:27Z"
    },
    "timestamp": 1520109746483
  }
}

Could be related to #139 ..

@nilsnolde nilsnolde changed the title instructions = 'false' returns HTTP 400 instructions = 'false' returns HTTP 400 Mar 3, 2018
MichaelsJP pushed a commit that referenced this issue Mar 5, 2018
added try-catch for segments
MichaelsJP pushed a commit that referenced this issue Mar 5, 2018
changed changelog
@TimMcCauley
Copy link
Contributor

TimMcCauley commented Mar 6, 2018

This API call is working for me, why?

{"routes":[{"summary":{"distance":5775.5,"duration":851.3},"geometry_format":"encodedpolyline","geometry":"mtkeHuv|q@~@VLHz@\\PR|@hBt@j@^n@L\\NjALv@Jh@NXi@zBm@jCKTy@z@qAhBa@\\[Ne@DgCc@i@?[Ty@hAi@zASRi@R}@H_@N[b@kAdCy@`Au@d@eA|@q@h@WRe@PYHYBqADgAAcAL_A^w@~@q@`@w@Zw@Cm@K[PeA|Aa@p@g@fAiAhBuAv@]VU^k@xAUXe@TqATy@V}@f@_@VO\\Mb@[fBe@|@Mp@WbCgClKSdAq@Rm@?g@WYg@G[[}Bk@qBy@wDUm@w@}@q@}A]o@k@y@kAjC_AjC_ApCe@z@i@j@q@f@[NsAp@u@T}A\\wATU?WCeBm@q@MwAGUCg@SMaAi@mDQm@K}@Mq@u@mAc@i@c@Ys@[WW_@q@e@a@cA_@w@E{BHmBXqBkBsA}@{Ao@iAB{@QYSi@qCUy@Ee@@SDWbA_BLKLAVNb@r@J@HEHK?]k@iDe@w@COAWBUh@qBDc@?c@Q{BGa@MQKCOBgA\\{@AKEs@Wq@i@q@{@s@gAk@kA]g@g@_@I]??k@i@yBkEa@}@W}@WkCUqC?_@Hg@ZqABg@Gm@YoAEgAMq@@jAB|CC`@{@rACH","way_points":[0,182],"bbox":[8.327138,48.231946,8.345244,48.263552]}],"bbox":[8.327138,48.231946,8.345244,48.263552],"info":{"attribution":"openrouteservice.org | OpenStreetMap contributors","osm_file_md5_hash":"f61b50606d03e2afe85a9170b50b08d6","engine":{"version":"4.5.0","build_date":"2018-02-27T14:22:36Z"},"service":"routing","timestamp":1520321033290,"query":{"profile":"driving-car","preference":"fastest","coordinates":[[8.34234,48.23424],[8.34423,48.26424]],"language":"en","units":"m","geometry":true,"geometry_format":"encodedpolyline","geometry_simplify":false,"instructions":false,"elevation":false}}}

@jab
Copy link

jab commented Mar 6, 2018

lol you just pinged a whole bunch of GitHub users and subscribed us to this issue! maybe adding code fences around your pasted output would have prevented?
https://help.github.com/articles/creating-and-highlighting-code-blocks/

@MichaelsJP MichaelsJP mentioned this issue Mar 6, 2018
11 tasks
@TimMcCauley
Copy link
Contributor

TimMcCauley commented Mar 6, 2018

Umpf, sorry @jab !! Pasting on the mobile fun definitely has some disadvantages... :)

@TimMcCauley
Copy link
Contributor

@MichaelsJP this has got nothing to do with the geojson fix or am I wrong ?

@rabidllama rabidllama added this to the 4.5.1 milestone Mar 6, 2018
MichaelsJP pushed a commit that referenced this issue Mar 6, 2018
added try-catch for segments
MichaelsJP pushed a commit that referenced this issue Mar 6, 2018
increased coordinates to 6 decimal precision
fix #139
added summary to geojson export
fix #138
added try-catch to prevent the bug
@MichaelsJP MichaelsJP mentioned this issue Mar 6, 2018
11 tasks
@MichaelsJP
Copy link
Member

@MichaelsJP this has got nothing to do with the geojson fix or am I wrong ?

@TimMcCauley In fact it is connected to it. The error only happens while instructions = false and format = geojson. It's a missing try-catch in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants