-
-
Notifications
You must be signed in to change notification settings - Fork 381
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
[bug]: Empty response for node-fetch http call #376
[bug]: Empty response for node-fetch http call #376
Comments
Hi, I want to work on this issue. |
I tried to reproduce this bug on the node-fetch sample program by setting |
Hi @Ramanjs, the problem is that I have not integrated the express hook in my local application. Hence, when you comment the require hook for express in node-fetch/server.js, then the application will crash with this message in screenshot |
Hello @re-Tick I am interested to work on this issue |
Hey @re-Tick I was trying to reproduce this issue. But even for me this is working fine. It would be really helpful if you can add precise instructions on how to reproduce this bug. |
@re-Tick Thanks for providing this info. I'm now able to reproduce the bug and I think I've understood the issue. I'll soon create a PR for this. |
Hi @re-Tick, the server crashes for all modes, not just when it is off. I am a bit confused about the expected result of this issue. The node-fetch module depends upon the middleware introduced by the express hook to generate and store test cases and their mocks and deps. If I use node-fetch alone, no mocks will be generated since there is no Keploy object and no context either. It would be amazing if you could clarify how this thing works and let me know if Im approaching this wrong. Thanks! |
Yes, you got this right @Ramanjs. The expected behaviour should that no test/mocks are generated because of missing express integration. But it should make the actual call to node-fetch which is currently missing. |
Can I work on this issue? |
Hi @Shaurya-Developer, please make your changes and open a PR. Ans mention the PR in the Gsoc/2023 ts-sdk task list. |
Okay, @re-Tic. And what I'm supposed to write in PR? “Solved #376 Gsoc/2023 ts-sdk” is this alright? |
Mention this issue and your changes in your PR and provide the link of PR in TS-SDK task list |
Alright, Thanks |
Please Assign this issue to me |
Hi @VishalMyla, the issues are open for all. Please feel free to discuse your changes here or make your PR. |
Is there an existing issue for this?
Current behavior
When I do a node-fetch call after integrating keploy/typescript, the response is not the expected result from that API. It can be due to intercepting the node-fetch API calls.
Steps to reproduce
Hence, you can see that node-fetch is returning empty Response instead of {status:200, body:"ok"}.
Environment
None
Version
Self-hosted
The text was updated successfully, but these errors were encountered: