Is there any error precedence when requesting ride? If so, is it defined somewhere in the API documentation?
For example, what error would be returned in this particular situation, if user tries to request ride:
User is already on an existing trip
Surge pricing is in effect for request product
I would expect error with code current_trip_exists to take precedence over surge error in this particular situation. That is the case when testing in sandbox.
There is not currently documentation on error precedence for the Uber API on developer.uber.com. Thank you for this feedback. At this time this is not a priority for the API but these edge cases are interesting and may be something to define in the future.
Related
What HTTP status code would be suitable for this purpose? The scenario is "I cannot let you evaluate a product because you have already done it". I was thinking about forbidden 403. Is that right?
I would use 402 Payment Required. Even though it's not widely used, I feel like it's perfect for this use case.
402 Payment Required
Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, as proposed, for example, by GNU Taler, but that has not yet happened, and this code is not usually used. Google Developers API uses this status if a particular developer has exceeded the daily limit on requests. Sipgate uses this code if an account does not have sufficient funds to start a call. Shopify uses this code when the store has not paid their fees and is temporarily disabled. Stripe uses this code for failed payments where parameters were correct, for example blocked fraudulent payments.
Source
use 405 Method Not Allowed - Meaning - The request method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code .
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.
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.
So I'm struggling to find where this is documented (if at all), but I'm getting the following error message when requesting data from the FB GraphAPI.
"Please reduce the amount of data you're asking for, then retry your request"
The call I'm making is:
/v2.3/user1/posts?fields=object_id&limit=100
If I change it to:
/v2.3/user2/posts?fields=object_id&limit=100
It returns 100 items.
Why would it work for one user, and not the other?
Both requests are authenticated via an access token (not belonging to either user) and I get the same error whether running it from my code, or the Facebook Graph API console of developers.facebook.com
The response from CBroe is correct. Facebook returns this error if it finds that too many internal resources are needed to respond to your request.
Therefore you have to do what the response says: limit it.
This can be done in (afaik) 2 ways:
Use the limit parameter and reduce the amount of responses you expect from the API
Provide a timeframe (using since and / or until) to fetch only data (posts / videos) for a specific timeframe.
We had the same issue as you, but with retrieving videos from a page. Unfortunately using the limit parameter did not work, even when I set it to limit=1. But by using the since / until parameters we finally got results.
Therefore I suggest to implement a timeframe in order to reduce the amount of data, or alternatively, split the amount of requests you make. e.g. if you want all posts from the past 3 months and run into the mentioned error: split your requests in half using since and until. If that still does not work: keep splitting...
=> Divide and conquer ;)
Hope it helps,
KR, ebbmo
Recent bug filed on FB talks about the same error. They seem to accept that this could be a bug, but not much other information forthcoming.
https://developers.facebook.com/bugs/1904674066421189/
There are both app-level and user-level rate limits that are enforced on Graph API calls. In your case, it could be that you've made a large number of calls in a short time with user1.
You can check out this page for more about Facebook's rate limits: https://developers.facebook.com/docs/marketing-api/api-rate-limiting (even though the URL refers to the Marketing API, the information also applies to the Graph API.)
Were getting a lot of #INTERNAL_SERVICE_ERROR's through the rest PayPal API. To get more details about the error we have been going the PayPal Tech Support. We've been able to fix some of the issues but it is taking us a lot longer than we would like. I was wondering if there was an API call that I could make that would give me the full details of the error or DebugID?
I am not sure how you are currently consuming the API, but https://developer.paypal.com/webapps/developer/docs/api/ specs the error object which has the debug_id, the PayPal internal identifier used for correlation purposes. The error object has information link and error_details object which has the detailed reasons for the error
If you are using an sdk to consume, it is possible to get the debug_id in your logs: https://github.com/paypal/rest-api-sdk-nodejs#debugging and https://github.com/paypal/rest-api-sdk-python#create-payment show ways to do that in Python and Node.
I myself am looking for the same information. But it appears the debug ID is only so Paypal support can correlate the error to a transaction event. Technically there is no other information associated with the Debug ID.
See Receiving INTERNAL_SERVICE_ERROR REST API
I'm a registered developer, and the error is not repeatable. It will work for one call and then fail again on the exact same call. What's going on?
#jsd Usually you receive the developer inactive error when you've been rate limited or your access token has expired.
Here is some documentation about the developer inactive error: https://developer.beatsmusic.com/docs/read/faq/Developer_Inactive
Also, if you have been rate limited you can send an email to beatsplatform#beatsmusic.com and they will raise your limit pretty quickly.
This can also happen if you fail to include the "client_id" parameter in your request.
This can also occur if you do not pass the access token correctly.
Some Beats endpoints require the access token to be passed in the Authorizationheader, while others require it to be passed via a querystring parameter.