-
Notifications
You must be signed in to change notification settings - Fork 12
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
Error thrown for cassettes that have an empty body #249
Comments
* Related to ropensci/vcr#249
This is a regression in v1.1.0. The error does not happen in v1.0.2. AFAICT the error occurs on all requests/responses that have an empty The error happens here Lines 121 to 125 in e4a52cb
I believe the error was introduced by cf5ee5b#diff-a947054c47f80b7252dac92d05ce9294c02a7671022a290403913f0bcfa4c197R150-R151 Essentially this line is missing now: Lines 156 to 157 in e4a52cb
Unfortuntely I don't have to time to draft a proper PR now, but this should be a simple fix if I am right. |
I think those initial lines in |
@dpprdan, I'm changing the tittle accordingly. |
@llrs Sorry, with "missing" I meant that they are not called now. The fix is to change Line 150 in e4a52cb
back to body_from(hash[["body"]])
You may have to scroll up a few lines to see the change I mean. |
Something something encoding 😉 |
Thanks to you @sckott for the package! It has prevented many more troubles than caused them! |
* Related to ropensci/vcr#249
Hi @sckott,
It looks like there is something wrong with cassettes that have a status code that is not 200. I only tried 401 and 404 so not sure about the other codes. (EDIT: @dpprdan pointed out that this is true for cassettes that have an empty body) Here is a reprex:
The first time
devtools::test()
is used, it works fine, the cassette is recorded correctly. But the second time I get this:I did not investigate further because I have limited time to work on this right now, I thought I could post this now in case you have an idea how to solve it quickly but if you cannot work on this now I could also investigate latter (assuming there is actually something wrong).
Session Info
The text was updated successfully, but these errors were encountered: