You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Florent Jaby (JIRA)" <ji...@apache.org> on 2014/07/18 16:23:04 UTC

[jira] [Created] (COUCHDB-2269) Return any type of 4xx error from validate_doc_update

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)