[
https://issues.apache.org/jira/browse/COUCHDB-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15658623#comment-15658623
]
ASF subversion and git services commented on COUCHDB-3195:
----------------------------------------------------------
Commit a987f5ca6a7e2974e7958dc00e949076e297f0e1 in couchdb-chttpd's branch
refs/heads/master from ILYA Khlopotov
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=a987f5c ]
Handle error terms from fabric
The fabric returns errors as {Class, Reason, Stack}
(see fabric_util:error_info/2).
Add the clause to error_info to handle it.
COUCHDB-3195
> Handle {Class, Reason, Stack} in chttpd:error_info.
> ---------------------------------------------------
>
> Key: COUCHDB-3195
> URL: https://issues.apache.org/jira/browse/COUCHDB-3195
> Project: CouchDB
> Issue Type: Bug
> Reporter: ILYA
>
> The fabric returns errors as {Class, Reason, Stack} (see here
> https://github.com/apache/couchdb-fabric/blob/master/src/fabric_util.erl#L206).
> We used to handle this case in chttpd
> https://github.com/apache/couchdb-chttpd/commit/0592297776fa700134b0d283a5f3c512f0f96533#diff-e5123f75012e2b3a7edc96b2f0a863b0R522.
> This was broken in
> https://github.com/apache/couchdb-chttpd/commit/ec31e09e540dc4916c416247d2eb8d132b51fffd
> Steps to reproduce
> Issue an invalid request to view for example.
> /_design/foo/_view/view1?start_key=%22bbb%22&end_key=%22aaa%22"
> The expected result is
> 400 {
> "error": "query_parse_error",
> "reason": "No rows can match your key range, reverse your start_key and
> end_key or set descending=true"
> }
> The actual result is
> 500 {
> "error": "query_parse_error",
> "reason": "No rows can match your key range, reverse your start_key and
> end_key or set descending=true",
> "ref": 3759544136
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)