-
Notifications
You must be signed in to change notification settings - Fork 6
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
Bugfix/13 delete zone record illegal argument exception #30
Bugfix/13 delete zone record illegal argument exception #30
Conversation
c71a2d5
to
3e78c6f
Compare
src/test/resources/com/dnsimple/deleteZoneRecord/success_non_empty.http
Outdated
Show resolved
Hide resolved
After discussing this issue in deep with @weppos, we've decided to either find a way to add a regression test that doesn't involve tampering with the fixtures or releasing the fix without tests. I've updated the PR description to document what we've learned so far. |
b17febc
to
80a354a
Compare
80a354a
to
5235a17
Compare
It may be good to add an entry in the CHANGELOG |
… mutating variables
05d5dc8
to
ba3e98b
Compare
I will hold merging this one for today to give @san983 some time to review it. |
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.
LGTM ✅
FIxes #13
This PR handles a case where the client fails to delete a zone record due to being unable to parse the API's response.
After studying this unexpected behavior, we discovered that other operations leading to
HTTP 204 No Content
responses will also fail with the same error.We have discarded a problem in the API responses and have established that the way we mock HTTP responses in our tests is making it difficult to reproduce the issue reported in #13.
We were able to reproduce the issue in a test by artificially modifying a response and were able to confirm that this PR is a fix for the issue.
The fix comes from completely skipping the parsing step if we get an HTTP 204, which we know it's going to be (it should be) empty.