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
When using an object with "response" on replyWithError the output always returns undefined #2243
Comments
could you share a code example with all code needed to run it? Here is a great example: https://runkit.com/fluggo/nock-nock-2197 |
I just ran into this issue as well, but then I figured out that if you set the value of the response to contain an object with metadata, it was no longer an issue.
|
I have the same problem @kmcdon10 is it working for you? Which version are you using? |
There is no update on this? I have same problem too. |
@mikicho Would it be possible for you to tell us which version of I had the same issue described here, and I am wondering what makes these differences. |
@mille-printemps probably Node 20 and nock latest |
@mikicho |
@mille-printemps What is the workaround? maybe it will help to understand the root cause. |
@mikicho I was using In order to check if the object caught in In order to test this, I tried to use It turned out that I used HTH. |
What is the expected behavior?
When using "nock('url').replyWithError({response: 'error"})"
console.log(error.response) should print ("error")
What is the actual behavior?
error.response is undefined
How to reproduce the issue
Versions
The text was updated successfully, but these errors were encountered: