| 8050 | throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); |
| 8051 | } |
| 8052 | if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { |
| 8053 | throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); |
| 8054 | } |
| 8055 | if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { |
| 8056 | throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); |
| 8057 | } |
| 8058 | if (connect2 != null && typeof connect2 !== "function" && typeof connect2 !== "object") { |
| 8059 | throw new InvalidArgumentError("connect must be a function or an object"); |
| 8060 | } |
| 8061 | if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { |
| 8062 | throw new InvalidArgumentError("maxRedirections must be a positive number"); |
| 8063 | } |
| 8064 | if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { |
| 8065 | throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); |