Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
Regular Contributors Level (Easy to Medium)
Description
Attempts to write security objects where the "admins" or "members" values are malformed will result in an HTTP 500 response with the following body:
{"error":"error","reason":"no_majority"}This should really be an HTTP 400 response with a "bad_request" error value and a different error reason.
To reproduce:
$ curl -X PUT http://localhost:15984/test {"ok":true} $ curl -X PUT http://localhost:15984/test/_security -d '{"admins":[]}' {"error":"error","reason":"no_majority"}