Reputation: 25
I am developing for the Uber API using the Sandbox environment and so far it has worked great.
However now I'm suddently getting errors for seemingly perfectly reasonable requests using the Ride Request Estimate API call (estimateRide
API call in the Java Uber Rides SDK), and am getting this error:
not_found
Invalid product_id
com.uber.sdk.rides.client.error.ApiException: 404 Not Found
Caused by: retrofit.RetrofitError: 404 Not Found
The requests are for example from 51.49661, -0.143597 or 51.49710, -0.14348 (and productName uberX). Just before performing the actual Ride Request Estimate API call, I am using the getProducts
API call to get the available Products for the given coordinates (which are identical to the one I am using for the Ride Request Estimate), and then filtering to pick the one the user has requested (e.g. uberX).
As I said, 99% of the time everything works great, but now suddenly I started getting these errors, and only for specific accounts I'm testing with.
What I am doing wrong? I can provide more details if needed.
[EDIT] The problem has reappared just now (2016-04-06 17:42:50 UTC). Example lat/lon that caused the error: 51.5038652, -0.2714952. Until this time, the endpoint has worked perfectly.
Upvotes: 1
Views: 390
Reputation: 231
When in non-sandbox (Production) mode, you cannot fetch trip estimates if the user is currently on a ride.
The 404 NotFound
error you reported was a bug in the API that has been fixed. We still do not allow you to query for trip estimates if there is an ongoing trip, but we have fixed the error response to be more accurate. Now, you should see a 403 Forbidden
error, with code: current_trip_exists
and the message: Trip estimates not allowed while the user is currently on a trip.
Upvotes: 2