Florent Jaby created COUCHDB-2269:
-------------------------------------

             Summary: Return any type of 4xx error from validate_doc_update
                 Key: COUCHDB-2269
                 URL: https://issues.apache.org/jira/browse/COUCHDB-2269
             Project: CouchDB
          Issue Type: Improvement
      Security Level: public (Regular issues)
          Components: HTTP Interface
            Reporter: Florent Jaby


When writing a validate_doc_update function it is only possible to throw one of 
the two following errors
{unauthorized: "message"} and {forbidden:"message"}

Since validations aren't always only needed for authorization pruposes, it 
would be meaningful to be able to throw different errors. If only one should be 
added, it perhaps should be 400 Bad Request first.

A simple use case could be that I'm limiting the size of certain fields.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to