-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
<bug> If no route found, estimated trip time is 214748365 #696
Comments
The response code should always be checked. That's why it is there. The value of the total time is the maximum value of signed 32-bit integer (INT_MAX) which is generally treated as a placeholder for infinity. |
Yes, I understand and am doing so in my own code. It just seems like On Sat, Aug 10, 2013 at 5:52 AM, Dennis Luxen [email protected]:
|
@jedhorne good point. Will likely change the behavior such that it does only give an estimate when a route is found. |
Awesome, thanks! On Fri, Nov 8, 2013 at 6:00 AM, Dennis Luxen [email protected]:
|
i think we should be consistent and generally leave out fields that wasn't requested: #518 |
closing here, for some time now the response (if no route is found) is: {"status":207,"status_message": "Cannot find route between points"} |
Requests of these type give response code 207, but if the response code isn't checked you'll wind up with bad data. Suggest that you not return a time in these cases.
I'm testing some data from July 7th this year. Here is a sample error:
curl "http://127.0.0.1:5000/viaroute?loc=48.8575127465,2.3586840939&loc=48.8577807181,2.35861138342"
{"version": 0.3,"status":207,"status_message": "Cannot find route between points","route_geometry": "","route_instructions": [],"route_summary":{"total_distance":0,"total_time":214748365,"start_point":"","end_point":""},"alternative_geometries": [],"alternative_instructions":[],"alternative_summaries":[],"route_name":["",""],"alternative_names":[["",""]],"via_points":[],"hint_data": {"checksum":64665092, "locations": ["PdtPAEp2LQA_AAAA____fwAAAAAAAPA_B41KAEKZAwA", "PdtPAEp2LQAUAAAA____f-VAtpPgetQ_Eo1KAFOZAwD"]},"transactionId": "OSRM Routing Engine JSON Descriptor (v0.3)"}
The text was updated successfully, but these errors were encountered: