What version are you running?
RBTools 0.6.2
What's the URL of the page containing the problem?
N/A
What steps will reproduce the problem?
1. Create & publish a review.
2. Get handle to the ReviewRequest via root.get_review_requests()
3. draft = review_request.get_or_create_draft()
3. draft.delete()
What is the expected output? What do you see instead?
The expected output should succeed successfully.
Instead, an exception is thrown because payload is empty (0-length):
review_draft.delete()
File "/Library/Python/2.7/site-packages/rbtools/api/resource.py", line 130, in <lambda>
meth(resource, **kwargs)))
File "/Library/Python/2.7/site-packages/rbtools/api/decorators.py", line 24, in request_method
*args, **kwargs)
File "/Library/Python/2.7/site-packages/rbtools/api/transport/sync.py", line 61, in execute_request_method
return self._execute_request(request)
File "/Library/Python/2.7/site-packages/rbtools/api/transport/sync.py", line 75, in _execute_request
payload = decode_response(payload, mime_type)
File "/Library/Python/2.7/site-packages/rbtools/api/decode.py", line 54, in decode_response
return decoder(payload)
File "/Library/Python/2.7/site-packages/rbtools/api/decode.py", line 30, in JsonDecoder
return json.loads(payload)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
This is likely a bug in the server not returning a valid JSON response?