-
-
Notifications
You must be signed in to change notification settings - Fork 734
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
replyWithError doesn't work with got #1661
Comments
Ahhh, see #1523. Got issues retries by default. This makes for confusing testing, and I think perhaps not a great default. Try: const response = await got("http://test/", { retry: 0 }); Or see our solution: Lines 3 to 6 in 11dba99
I expect other devs to run into this issue so I'd welcome a pull request with a documentation update! |
paulmelnikow
added a commit
that referenced
this issue
Aug 22, 2019
paulmelnikow
added a commit
that referenced
this issue
Aug 23, 2019
🎉 This issue has been resolved in version 11.3.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
gr2m
pushed a commit
that referenced
this issue
Sep 4, 2019
gr2m
pushed a commit
that referenced
this issue
Sep 4, 2019
gr2m
pushed a commit
that referenced
this issue
Sep 5, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the expected behavior?
replyWithError('err')
orreply(500, {error: 'err'})
should return give valid error response in catch block when doing a request with gotWhat is the actual behavior?
Nock is crashing
Possible solution
How to reproduce the issue
Glitch: Example link
Codesandbox: Example link
Does the bug have a test case?
Versions
Latest stable and beta. I for some reason latest beta has some problem with dependencies on both Glitch and CodeSandbox, so i've used 11.0.0-beta.29 but it reproduces locally
The text was updated successfully, but these errors were encountered: