Fix WebAPI errors returning empty messages
Review Request #7415 — Created June 12, 2015 and submitted — Latest diff uploaded
Previously, the WebAPI would sometimes return a empty error. This was
because we were referring to themsg
attribute of the underlying
exception, instead of casting it to a text type.Also fix some typos that were introduced in the errors module.
Unit tests have been introduced to test the behaviour of raising a
ReopenError
,CloseError
, andPublishingError
during a review
request reopen, close, and publish, respectively.
Ran unit tests.
reviewboard/reviews/errors.py |
---|
reviewboard/webapi/resources/base_review.py |
---|
reviewboard/webapi/resources/review_reply.py |
---|
reviewboard/webapi/resources/review_request.py |
---|
reviewboard/webapi/resources/review_request_draft.py |
---|
reviewboard/webapi/tests/test_review_request.py |
---|