I'm not entirely sure if this is directly related to this issue, but I suspect
it is, and possibly a few others.
This code -
https://github.com/apache/couchdb/blob/deba7575a1a67fe06850959e99af3e0e9c704443/src/couch/include/couch_erl_functions.hrl#L32
-
```
true -> throw({forbidden, <<"Only admins may delete other user docs.">>})
```
Will throw an `unknown_error` to the log, and return a `500` status code to the
frontend.
If instead, I do:
```
true -> {[{ <<"forbidden">>, <<"Only admins may delete other user docs.">> }]}
```
Then no error appears in the log, but a `403` is returned to the frontend,
along with the contents of the second element in the tuple.
This appears to match the clause in the case statement found here -
https://github.com/apache/couchdb/blob/master/src/couch/src/couch_query_servers.erl#L379
Might this be related?
[ Full content available at: https://github.com/apache/couchdb/issues/1051 ]
This message was relayed via gitbox.apache.org for [email protected]