Return a real error message when trying to close drafts via the API.

Review Request #7406 — Created June 11, 2015 and submitted

Information

Review Board
release-2.0.x
d6aa63e...

Reviewers

In the case where an API request was trying to close as submitted a review
request that hadn't been published yet, we would crash with an unhandled
exception. The problem here is that we added validation to prevent people from
marking unpublished review requests as submitted, but failed to handle that in
the resource code.

We had similar handling in other resources, so I've just copied the logic over.

Issued a close via the dashboard and didn't see an exception on my devserver.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/resources/review_request.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/resources/review_request.py
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (c1a8bbb)