couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Dijkhuis (JIRA)" <>
Subject [jira] [Created] (COUCHDB-1706) function_clause error when querying views with cors
Date Thu, 14 Mar 2013 18:52:12 GMT
Sander Dijkhuis created COUCHDB-1706:

             Summary: function_clause error when querying views with cors
                 Key: COUCHDB-1706
             Project: CouchDB
          Issue Type: Bug
          Components: HTTP Interface
            Reporter: Sander Dijkhuis

When querying views using the new cross-origin support, CouchDB sometimes raises a function_clause
error instead of returning the results. It doesn’t do so consistently. For example, if the
other-origin webpage makes two requests after each other, one may work and the other may fail
(in any order). I haven’t seen this error yet when querying views without using cors. Rebuilding
CouchDB, remaking the databases or refreshing the views doesn’t work and the view itself
doesn’t do much that can go wrong:

{code:title=The view}
profiles: {
  map: function(doc) {
    if (doc.type && doc.type == 'profile') emit(doc.user, null);

I’m running CouchDB 1.3 commit 8be3ec0218873fa3516f564678dbd2c74ebb5246 with build-couchdb
commit fabf7c51c8c5b278b72ffe95f12915016f104996.

{code:title=The stacktrace}
[error] [<0.653.0>] function_clause error in HTTP request
[info] [<0.653.0>] Stacktrace: [{string,to_lower,                                  
[info] [<0.653.0>] - - GET /lunacy%2Fuser%2Fsander/_design/user/_view/profiles?include_docs=true&key=%22Bot%203%22&reduce=false
[error] [<0.653.0>] httpd 500 error response:                                      

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message