incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Clark <dbfcl...@gmail.com>
Subject Strange ajax problem
Date Mon, 17 May 2010 15:51:08 GMT
Unfortunately, my list is already wrapped in a provides and the
problem continues; I'm running 0.12.0a938305 and here's my stacktrace:

[error] [<0.311.0>] function_clause error in HTTP request
[info] [<0.311.0>] Stacktrace: [{mochiweb_util,parse_qs_key,[undefined,[]]},
             {mochiweb_util,parse_qs,2},
             {couch_httpd_external,json_req_obj,3},
             {couch_httpd_show,start_list_resp,6},
             {couch_httpd_show,finish_list,7},
             {couch_query_servers,with_ddoc_proc,2},
             {couch_httpd_db,do_db_req,2},
             {couch_httpd,handle_request_int,5}]


On May 12, 2010, at 12:59 PM, Dennis Clark wrote:

> Long time lurker, first time writer?
>
> I'm writing a couchapp and I'm trying to use ajax to get a list from my design document
and load it into my page. I get a function_clause error when I run the
list from jquery, but
if I try to get the same URL with curl or just open the link that
generates the error in a
new browser window I get exactly what I'm supposed to. Happy to
provide more information if
it helps, but is there some kind of known problem that's causing this
behavior that someone
can just tell me how to avoid?
>

This could be due to a mismatch in the Accept header handling. maybe.

It's worth trying to wrap your list in a

function(req, head) {

provides("html", function() {
  // html handling code here
  while (row = getRow()) { ... blah ... }
});

};
Hope that helps. If it doesn't please provide your version info and a
stacktrace so we can
help you in more detail.

Thanks,
Chris

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message