Hi,
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.
ordersApi.searchOrders(query)
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
Thanks
Sam