Error while making requests to Quickbooks-Online - 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"}

Related

Is there any solution how to fix network error while sending data in API?

I am getting network error and data is not sending in the API but the same code works fine on the other system when it is cloned.. Does anybody know ho to get rid of this network error

Flask suddenly not receiving request from React client

I have React app in front-end (client), calling API provided by Flask back-end (server) via axios package.
Both client and server are running locally. Client: localhost:3000. Server: localhost:5000
The problem is: after many requests, the server can not receive request from client.
Here is the picture of the received requests, which is captured in backend:
As you can see, after some success request, the React app stuck with pending request:
The lastest request: 127.0.0.1 - - [11/Jun/2020 09:34:39] "GET /posts HTTP/1.1" is error 500, but in network tab of chrome, the request is still pending, so i dont know if the server received that request or not. Nothing shown in console log of chrome, no error printed in backend terminal windows (i have some lines of code to print error in backend), just the error 500
What am i doing wrong? If this question is still confused, please comment below and i can update more info about it. Thank you!
The fact that your server is reporting a 500 error, but the request on the client is still pending makes me think that something is wrong on the server side.
To verify this, you can try manually calling raise Exception() in one of your endpoints. Then instead of seeing the error resolve through the react app, you can try calling your endpoint with curl, or a client like Postman. If you are able to see a 500 error there, then the error is likely in your React app. If that request does not resolve, then the error is probably in the server.
Is an error response is being sent to the client? The way to do this in flask is using error handlers.
Thank you for helping me.
i debugged my server and found that 2 request call from react app were served by 1 cursor
(i used 1 connector.cursor for the whole connection => 2 request arrives in one moment => the cursor does not know how to serve the result)
=> Solution: change 2 request to 1 new request to new API, in new API, return the result which is containing both result of that 2 request

Google Cloud Pub/Sub node library error parsing

I'm trying to handle error responses returned from the Google Cloud Pub/Sub api using their node client library. From what I can see, if you use their REST API directly (ie. not through the client library) they return common HTTP error codes:
https://cloud.google.com/pubsub/docs/reference/error-codes
However, their client library returns RPC style errors that do not adhere to http status code conventions.
I have a worker that is processing these responses and is expecting responses to conform to standard http response conventions. Does anyone know if there is a way to intercept the actual HTTP response that the client is handling and extract a status code from it? Alternatively, is there documentation somewhere listing out the potential RPC errors the node client can return so I can set up a mapping from them to http codes?
Thanks!
FYI this got answered as a Github issue here: https://github.com/GoogleCloudPlatform/google-cloud-node/issues/2761#issuecomment-348358474

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.

Apache CXF - How to know while sending which response "Broken pipe" is occuring

I see lots of exceptions[ClientAbortException: java.net.SocketException: Broken pipe] in
my catalina log while trying to send the response back but i am not able to tie this exception
to a particular request with a particular Inbound Message ID, Is there any way by which i can know, while sending
which response this exception is occuring in cxf ?
Try enabling SOAP logging. If you enable SOAP logging as follows, you will see SOAP requests and/or responses including HTTP headers. CXF also assigns a message ID for each request/response.
#WebService
#org.apache.cxf.annotations.Logging
public interface AssetServices {
....
}

Resources