uaru opened a new issue #3960:
URL: https://github.com/apache/couchdb/issues/3960


   ## Description
   
   When the server receives the request authorized with JWT with payload
   
   ```
   {
      :sub => username,
      :'_couchdb.roles' => roles,
      :exp => ...,
   }
   
   ```
   and `roles` is a string, the server returns error 500 Internal Server Error 
with 
   
   ```
   {
     "error": "internal_server_error",
     "reason": "No DB shards could be opened.",
     "ref": ...
   }
   ```
   
   ## Steps to Reproduce
   
   ```
   curl -X GET --location "https://<couchdb_server>:6984/<db>/<document>" \
       -H "Accept: application/json" \
       -H "Content-Type: application/json; charset=utf-8" \
       -H "Authorization: Bearer <JWT Token>"
   
   ```
   
   The server return error 500, with body:
   
   ```
   {
     "error": "internal_server_error",
     "reason": "No DB shards could be opened.",
     "ref": ...
   }
   ```
   
   ## Expected Behaviour
   
   The server should return 400 Bad Request.
   
   ## Your Environment
   
   Server: CouchDB/3.2.1 (Erlang OTP/23) 
   
   Running in Docker on Ubuntu 18.04
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to