Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-3374

500 instead of 401 when trying to create an index without authorization

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.0.0
    • None
    • HTTP Interface
    • None

    Description

      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"}

      Attachments

        Activity

          People

            Unassigned Unassigned
            flimzy Jonathan Hall
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: