Closed alichass closed 3 years ago
What I'd expect from a well-behaved API is a 404.. Or any 4xx, which is what would prevent smth like that. But google maps :shrug:
I guess we should still handle it (eventually anyways;)), even if Google is being idiot here..
There's another really weird unrelated (unsure if its google specific, likely is) edge case, where requesting a walk or car route can sometimes result in a route with a ferry step
Here's what I did (dry run output):
url: https://maps.googleapis.com/maps/api/directions/json?departure_time=1602059400&destination=37.42306%2C-122.08413&key=####################&mode=transit&origin=37.26044%2C-122.11921&units=metric Parameters: { "headers": { "User-Agent": "routingpy/v0.3.2", "Content-Type": "application/json" }, "timeout": 60 }
Here's what I got
Seems to be cause by this repsonse: {'available_travel_modes': ['DRIVING', 'WALKING', 'BICYCLING'], 'geocoded_waypoints': [{}, {}], 'routes': [], 'status': 'ZERO_RESULTS'}
Here's what I was expecting
Empty direction object if response is: {'available_travel_modes': ['DRIVING', 'WALKING', 'BICYCLING'], 'geocoded_waypoints': [{}, {}], 'routes': [], 'status': 'ZERO_RESULTS'}