"Failed to load resource" when using Realtime API - google-drive-realtime-api

When working with the realtime API I sometimes get this error:
Failed to load resource: the server responded with a status of 400 (Unknown SID) https://drive.google.com/otservice/bind?id=13bt-KPBrU6WRdWSqLBl2cni366tuZqT…&RID=rpc&SID=7808B6FE50C4A180&CI=0&AID=15&TYPE=xmlhttp&zx=64nyubda57et&t=1
What does it mean?

This error is a known issue with the Realtime API and we are working to track down the cause. In general, the API will automatically retry the request and you can ignore the error.

Related

Is 502 an appropriate status code for a database error?

The definition of the 502 Bad Gateway status code is:
The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.
Is it an appropriate status code to respond with if the error was caused by the database? Despite the fact that the definition of the 500 Internal Server Error status code doesn't state that the error has to be internal, I don't like using it when the error is external.
Can the web server be considered to be a gateway or a proxy, since it is performing tasks other than communicating with the database, such as making calls to other APIs and services?
No, I don't think an HTTP 502 Bad Gateway error is appropriate when a database error occurs.
HTTP errors say something about the HTTP protocol. This specific error indicates a server is trying to relay the HTTP request, but the upstream server did not respond correctly.
Your web application communicating with a database server is outside the realm of HTTP and any errors should be wrapped in the generic HTTP 500 Internal server error response code.
There is no reference for the Database error status code. You can use 500 Internal Server Error as a response.

Error while making requests to Quickbooks-Online

We are unable to make requests to Quickbooks online. While trying to communicate to Quickbooks API we keep on getting
General IO error while proxying request; errorCode=006003
Some sample requests:
https://quickbooks.api.intuit.com/v3/company/386413351/query?query=SELECT+*+FROM+CompanyInfo&requestid=1a91078d661245dc809f31870c4ccdb9&minorversion=1&
https://quickbooks.api.intuit.com/v3/company/1280984235/query?query=SELECT+COUNT%28*%29+FROM+Item&requestid=a4569163846943379801926b21c21e81&minorversion=1&
All of them ending in the same error message. It would be very helpful, if anyone has any clue about this.
{"Fault":{"Error":[{"Message":"message=General IO error while proxying request; errorCode=006003;statusCode=500","code":"6003"}],"type":"SERVICE"},"requestId":"e803880ca8d1448a9e2d87d194b08541","time":"2014-12-02T07:12:42.955Z"}

Error Uploading image to google cloud storage from Google app engine php app

I am trying to upload images to Google cloud storage using CKeditor4.3.3 image2 plugin from google engine app (php).
POst method return 303 status.
GET returns:
Request URL:http://temporary-blobstore-error.appspot.com/
Request Method:GET
Status Code:500 Internal Server Error
Request Headersview source
I get the following error displayed fromhttp://temporary-blobstore-error.appspot.com/:
Error: Server Error
The server encountered an error and could not complete your request.
Please retry your last submission.
If the problem persists, please contact the person responsible for the application you're using, or, if you are that person, report your problem and mention this error message and the query that caused it.
Following is the Request URL:
[http://v01.mysite.appspot.com/_ah/upload/?aa=ask&cat=2/AMmfu6aYRdoHF3NpG27hJRWyx-RH_Vo5r6NhzqyIK-3YRw7I3OHv_zq6SUYElQKg3phbtFu6GIG_MnltZjS03xNPSDKfA-dmsabvdvdmavdmavmvamdsvmdVMDVAMVmadva-e_rmabsmdvdmsdbmsdbmabdmasbdmasbdmsmdYR2MuM7rBb6dEttPzPYVylmw9/ALBNUaYAAAAAUy-nio2CLZdkumm87rKdUq9oOz1hVJgN/&CKEditor=content&CKEditorFuncNum=0&langCode=en][1]

Salesforce REST API getting an error 401

I am using REST API get information from Salesforce to my PHP page. After a long time don't use on PHP page I take a error message "failed with status 401, response [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}], curl_error , curl_errno 0". Please help me how to recall Authentication on php to avoid session timeout? I want my Page is always connection to Salesforce. please tell me other suggestions to resolve it.
The session ID or OAuth token used has expired or is invalid. The response body contains the message and errorCode. - http://www.salesforce.com/us/developer/docs/api_rest/Content/errorcodes.htm
Just catch that 401 error and reauthenticate.
Or use the refreshToken when using Oauth. As documented here: http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com

Email Receiving Service - HTTP error response vs throw Exception

If the processing of an email fails (eg. API timeout) should I return a 500 (404 ?) or throw an Exception.
Whilst it's undocumented I'm assuming that AppEngine with behave similarly to task queues and retry the http call to deliver the email. Is this a reasonable assumption?
Since the mail system uses webhooks and interacts with App Engine at the HTTP level, your only option is to return an error status. If you throw an exception, your framework will convert this into a 500 response. That's a legitimate way to return a 500 - so how you do this is up to you.

Resources