Review Board

beta

Return a real error for invalid fields

Updated 10 months ago

David Trowbridge Reviewers
trunk reviewboard
415
None Review Board SVN
This change adds validation for the 'value' field in /api/json/reviewrequests/98/draft/set/<field>/

It's a pretty straightforward change, but Christian's last comment on the bug made me worried about this implementation, so up for review it goes.

 
Posted 10 months ago (March 10th, 2008, 1:10 a.m.)
I had misunderstood part of that bug report. What I was referring to is that if you specified an invalid field, we should return an error. Right now we don't, and instead just return "ok" but with "invalid_whatever".
Loading diff fragment...
Can you rename this INVALID_FIELD_VALUE?
  1. Christian Hammond 10 months ago (March 10th, 2008, 1:15 a.m.)
    Actually, this should probably go in djblets/webapi/errors.py as MISSING_ATTRIBUTE (similar to INVALID_ATTRIBUTE).