GitHub user mikewallace1979 opened a pull request:

    https://github.com/apache/couchdb-couch/pull/86

    Return bad_request on view compilation error

    A request adding a non-compiling view was previously generating
    an HTTP 500 response. However, because the request is supplying an
    invalid view an HTTP 400 bad request response would be appropriate
    here. It would also make things clearer to the client that the
    fault lies within the request rather than the server.
    
    This commit updates the error returned on view compilation error
    to a {bad_request, compilation_error, Msg}. This will be converted
    into an HTTP 400 response by chttpd.
    
    Closes COUCHDB-2772

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mikewallace1979/couchdb-couch 
2772-http-400-on-view-compilation-error

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-couch/pull/86.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #86
    
----
commit 629e1553127a49f5891cd373eba4139ee54b11eb
Author: Mike Wallace <[email protected]>
Date:   2015-08-12T17:38:19Z

    Return bad_request on view compilation error
    
    A request adding a non-compiling view was previously generating
    an HTTP 500 response. However, because the request is supplying an
    invalid view an HTTP 400 bad request response would be appropriate
    here. It would also make things clearer to the client that the
    fault lies within the request rather than the server.
    
    This commit updates the error returned on view compilation error
    to a {bad_request, compilation_error, Msg}. This will be converted
    into an HTTP 400 response by chttpd.
    
    Closes COUCHDB-2772

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to