• 
      

    Return a real error for invalid fields

    Review Request #290 — Created March 9, 2008 and submitted

    Information

    Review Board SVN (deprecated)
    trunk
    415

    Reviewers

    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.
    
     
    chipx86
    1. 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".
    2. /trunk/reviewboard/webapi/json.py (Diff revision 1)
       
       
      Can you rename this INVALID_FIELD_VALUE?
      1. Actually, this should probably go in djblets/webapi/errors.py as MISSING_ATTRIBUTE (similar to INVALID_ATTRIBUTE).
    3.