Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3646 by vlov...@gmail.com: RBTools API throws an exception trying to discard a review it created
https://code.google.com/p/reviewboard/issues/detail?id=3646

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?

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.

Reply via email to