Closed Cherry closed 7 months ago
https://www.npmjs.com/package/got/v/6.7.1#timeout implies it should be handling issues with connect
and socket
.
@Cherry Did you attempt to manually query the API during the outage (eg, with curl)? If so, what behavior did you see? I'm trying to figure out what a test case here might be.
I did not unfortunately, sorry.
it would be great if we can allow setting the timeout in the cloudflare constructor, because currently there is no way to set it up.
Also, according to this issue in got: https://github.com/sindresorhus/got/issues/215
https://github.com/cloudflare/node-cloudflare/blob/master/lib/Client.js#L53 should fallback to 0
and not undefined
.
(A side note, the retries option has been changed to retry in the newer version of got)
Otherwise, the request would hang forever and the cloudflare wouldn't throw/terminate
v. 11.8.2
timeout
in options
not working. takes longer than defined (ms)
Looking at https://github.com/cloudflare/node-cloudflare/blob/f3a91319706e23047651243892d7284d97b66af2/lib/Client.js#L52 seems to imply the default timeout for this library is 10 seconds.
However, during times of API outages such as https://www.cloudflarestatus.com/incidents/g7nd3k80rxdb, requests seem to just hang forever, and never timeout.
Code to replicate: