You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The gem breaks when the distance between two coordinates is over 100 miles. #34 is a PR that fixes the problem just for reference - be warned that it breaks the requests endpoint (since it passes useful information on the error response, and I am simply throwing an error for any 4xx & 5xx response).
I'd like to see suggestions on a good way to catch this 100 miles error (that seems a bummer, really)
Details:
[2]pry(main)> $uber.price_estimations(start_latitude: -23.434553,start_longitude: -46.478126,end_latitude: -23.460275,end_longitude: -40)NoMethodError: undefinedmethod`each' for "Distance between two points exceeds 100 miles":Stringfrom /home/giba/.rvm/gems/ruby-2.4.1/gems/uber-ruby-0.9.0/lib/uber/base.rb:12:in `initialize'
{
"fields": {
"start_longitude": "Distance between two points exceeds 100 miles",
"end_longitude": "Distance between two points exceeds 100 miles",
"start_latitude": "Distance between two points exceeds 100 miles",
"end_latitude": "Distance between two points exceeds 100 miles"
},
"message": "Distance between two points exceeds 100 miles",
"code": "distance_exceeded"
}
{
"fields": {
"start_longitude": "Distance between two points exceeds 100 miles",
"end_longitude": "Distance between two points exceeds 100 miles",
"start_latitude": "Distance between two points exceeds 100 miles",
"end_latitude": "Distance between two points exceeds 100 miles"
},
"message": "Distance between two points exceeds 100 miles",
"code": "distance_exceeded"
}
The text was updated successfully, but these errors were encountered:
Drowze
changed the title
Price estimates on over 100 miles
NoMethodError on #price_estimates for coordinates over 100 miles
Jul 13, 2017
The gem breaks when the distance between two coordinates is over 100 miles.
#34 is a PR that fixes the problem just for reference - be warned that it breaks the requests endpoint (since it passes useful information on the error response, and I am simply throwing an error for any 4xx & 5xx response).
I'd like to see suggestions on a good way to catch this 100 miles error (that seems a bummer, really)
Details:
Uber API details (for reference):
Request (v1.2)
Response (v1.2)
Request (v1)
Response (v1)
The text was updated successfully, but these errors were encountered: