You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Jonathan Hall (JIRA)" <ji...@apache.org> on 2017/04/13 23:57:41 UTC

[jira] [Created] (COUCHDB-3374) 500 instead of 401 when trying to create an index without authorization

Jonathan Hall created COUCHDB-3374:
--------------------------------------

             Summary: 500 instead of 401 when trying to create an index without authorization
                 Key: COUCHDB-3374
                 URL: https://issues.apache.org/jira/browse/COUCHDB-3374
             Project: CouchDB
          Issue Type: Bug
          Components: HTTP Interface
            Reporter: Jonathan Hall


To reproduce, try to create an index without authorization:

curl -v -X POST http://localhost:6001/new/_index -H "Content-Type: application/json" -d '{"index":{"fields":["foo"]}}'

result:

< HTTP/1.1 500 Internal Server Error
< Cache-Control: must-revalidate
< Content-Length: 102
< Content-Type: application/json
< Date: Thu, 13 Apr 2017 23:56:09 GMT
< Server: CouchDB/2.0.0 (Erlang OTP/17)
< X-Couch-Request-ID: c404e0504a
< X-CouchDB-Body-Time: 0
< 
{"error":"error_saving_ddoc","reason":"Unknown error while saving the design document: unauthorized"}




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)