-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClientRequest: Clones request options to prevent mutations #87
Conversation
kettanaito
commented
Jan 13, 2021
- Fixes Getting "TypeError [ERR_INVALID_ARG_TYPE]: The "timeout" argument must be of type number. Received an instance of Object" when using "got" #86
c0f474d
to
fc1735f
Compare
@kettanaito Do you need something from me to get this merged? |
Hey, @KnisterPeter. Unfortunately, even with this change, the issue is not resolved. This pull request does fix the mutation of While that's probably an issue on the |
Thanks for explaining. Would be nice to at least see this issue fixed. |
I don't mind merging this, but the issue won't be solved by this pull request alone. That's why I'd prefer not to merge half-fixes. I hope for your understanding on that. |
Sure, do as you like. Thanks anyway 😃 |
fc1735f
to
b624e70
Compare
b624e70
to
64c4222
Compare
I put |
I found the culprit: https://github.com/mswjs/node-request-interceptor/blob/64c42229cf4d68fe58809e4679bce3592939d9c7/src/interceptors/ClientRequest/ClientRequestOverride.ts#L282 where is the |
|
64c4222
to
825c720
Compare
Thank you so much for the investigation, @szmarczak ❤️ You're right, we didn't pass the correct url to the original I've set it to propagate the req = performOriginalRequest(url.toString(), options) That way we don't have to typecast the url to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I'm glad I could help |
You are incredibly helpful, @szmarczak. Thank you! |