You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/13 22:06:20 UTC
[jira] [Commented] (COUCHDB-3195) Handle {Class, Reason, Stack} in
chttpd:error_info.
[ https://issues.apache.org/jira/browse/COUCHDB-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15573343#comment-15573343 ]
ASF GitHub Bot commented on COUCHDB-3195:
-----------------------------------------
GitHub user iilyak opened a pull request:
https://github.com/apache/couchdb-chttpd/pull/146
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
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloudant/couchdb-chttpd 71810-handle-errors-terms-from-fabric
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-chttpd/pull/146.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #146
----
commit 3d377bfe842a58e3217e44ad6edafec321a04098
Author: ILYA Khlopotov <ii...@apache.org>
Date: 2016-10-13T22:02:20Z
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)