No timeout on requests
wanjas opened this issue · 1 comments
Hello,
I believe node-fetch
doesn't have a timeout in the node environment by default.
hubspot-api-nodejs is not customizing this behavior (https://github.com/HubSpot/hubspot-api-nodejs/blob/master/src/services/http/HttpClient.ts#L5)
Unfortunately, I don't have a reproducible example because the potential issue depends on network connectivity and Hubspot server, but it seems like I bumped into a situation when API requests were hanging for more than 12 hours.
I would propose adding 'signal' option to the send
method or just making send
to have a reasonable timeout by default.
P.s. Please, correct me if I misunderstood node-fetch
behavior.
Hi, @wanjas . In my research I saw that node-fetch has an default timeout of 30 or 120 seconds, depending on version.
Source: nodejs/undici#1373