ethanent / phin

Node HTTP client
MIT License
576 stars 33 forks source link

Error in node v10.8.0 If `timeout` is not specified #22

Closed rizalp closed 6 years ago

rizalp commented 6 years ago

Received error:

TypeError [ERR_INVALID_ARG_TYPE]: The "msecs" argument must be of type number. Received type object

It seems that node add several changes to handle socket timeout and agent here https://github.com/nodejs/node/commit/949e8851484c016c07f6cc9e5889f0f2e56baf2a#diff-5f7fb0850412c6be189faeddea6c5359R180. This impacts phin as the default value for timeout is null

sending request with timeout: added fix the issue

ethanent commented 6 years ago

Thanks for catching this. I'll look into it soon.

ethanent commented 6 years ago

Thanks again for reporting the issue. It's been resolved in phin version 2.9.1! (35f5b2188e15e1b897fdfcee75bdac5191b3f69a)