Requests hanging on NodeJS SDK


I’m using the nodejs sdk client, and noticing that sometimes, requests to fetch data from the square api is just hanging.
I’ve been mostly testing with the orders endpoint, but i believe its happening with others too.


I’ve set up my client with a timeout of 10 seconds:

const getClient = (accessToken) => {
  const client = new Client({
    environment: SQUARE_ENVIRONMENT,
    accessToken: accessToken,
    timeout: 10000,
  return client;

To confirm it was hanging when calling searchOrders, I wrapped the method with my own timeout of 30 seconds, which gets called.

Am I setting up the timeout value correctly in the client? Is there something else i can check to see why it might be getting stuck?

My client id is sq0idp-w5z5mY5r3QnSidvCsQHU-w



:wave: When you get these timeouts can you confirm in your API Logs that the request is making it to our servers? :slightly_smiling_face:

Hey, sorry for delay here!

I’ve done some testing and I’m pretty sure I see the request in the api, with a response.
It doesnt happen every request, but it does happen quite frequently.

I’m currently working around it by implementing my own timeout as I mentioned before so its not an urgent issue for me, but would be good to investigate.

I’m currently using nodejs library 19.0.0


Okay, thanks for the additional information. I’ll share this with the team. :slightly_smiling_face: