You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by "Markus Jelsma - Buyways B.V." <ma...@buyways.nl> on 2009/12/01 11:35:13 UTC

_show without docid returns 500 instead of 404

Dear list,


According to
http://books.couchdb.org/relax/design-documents/shows#Querying%20Show%
20Functions i should receive an HTTP 404 Not Found response, instead i
get a HTTP 500 Internal Server Error. I am unsure as of yet whether i am
doing something wrong or if i should file a bug report for this one.

Here are my two documents in my test database named shows:

{
   "_id": "_design/test",
   "_rev": "1-21a6d69070ae4bec3e9f14fbb7f93201",
   "shows": {
       "summary": "function (doc, req) { return '<h1>'+doc.title+'</h1><p>'+doc.body+'</p>'; } "
   }
}

and

{

   "_id": "bd108c433aedaa1bd2def0ec85e59a0d",
   "_rev": "3-5a031adf97aabe4888b9bfb94ba28d13",
   "title": "title",
   "body": "body text"
}


I receive proper results using the following HTTP GET request
http://zealand:5984/shows/_design/test/_show/summary/bd108c433aedaa1bd2def0ec85e59a0d
- code : 200
- body : <h1>title</h1><p>body text</p>

Now consider querying the same show function with a non-existing
document id 
http://zealand:5984/shows/_design/test/_show/summary/404
- code 500
- body {"error":"normal","reason":"{gen_server,call,\n
[couch_query_servers,\n             {ret_proc,{proc,<0.1481.0>,<<
\"javascript\">>,\n
{couch_os_process,prompt},\n
{couch_os_process,set_timeout},\n
{couch_os_process,stop}}}]}"}



Here is the output in the couch.log file:

[Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1594.0>] OAuth Params: []

[Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1726.0>] OS Process ::
function raised error: TypeError: doc is null

[Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1726.0>] OS Process ::
stacktrace: (null,[object Object])@:0
runShow(function (doc, req) {return "<h1>" + doc.title + "</h1><p>" +
doc.body + "</p>";},null,[object Object],"function (doc, req) { return
'<h1>'+doc.title+'</h1><p>'+doc.body+'</p>'; }
")@/usr/share/couchdb/server/main.js:388
("function (doc, req) { return '<h1>'+doc.title+'</h1><p>'+doc.body
+'</p>'; } ",null,[object Object])@/usr/share/couchdb/server/main.js:358
@/usr/share/couchdb/server/main.js:842


[Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.1594.0>] OS Process Error ::
{render_error,{[{<<"body">>,
                                     <<"<html><body><h1>Render
Error</h1><p>JavaScript function raised error: TypeError: doc is
null</p><h2>Stacktrace:</h2><code><pre>(null,[object Object])@:0
\nrunShow(function (doc, req) {return \"&lt;h1&gt;\" + doc.title +
\"&lt;/h1&gt;&lt;p&gt;\" + doc.body + \"&lt;/p&gt;\";},null,[object
Object],\"function (doc, req) { return '&lt;h1&gt;'+doc.title
+'&lt;/h1&gt;&lt;p&gt;'+doc.body+'&lt;/p&gt;'; }
\")@/usr/share/couchdb/server/main.js:388\n(\"function (doc, req)
{ return '&lt;h1&gt;'+doc.title+'&lt;/h1&gt;&lt;p&gt;'+doc.body
+'&lt;/p&gt;'; } \",null,[object
Object])@/usr/share/couchdb/server/main.js:358
\n@/usr/share/couchdb/server/main.js:842\n</pre></code><h2>Function
source:</h2><code><pre>function (doc, req) { return
'&lt;h1&gt;'+doc.title+'&lt;/h1&gt;&lt;p&gt;'+doc.body+'&lt;/p&gt;'; }
</pre></code></body></html>">>}]}}

[Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1628.0>] Unknown linked
process died: <0.1726.0> (reason: normal)

[Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.53.0>]
{error_report,<0.24.0>,
              {<0.53.0>,supervisor_report,
               [{supervisor,{local,couch_secondary_services}},
                {errorContext,child_terminated},
                {reason,normal},
                {offender,[{pid,<0.1628.0>},
                           {name,query_servers},
                           {mfa,{couch_query_servers,start_link,[]}},
                           {restart_type,permanent},
                           {shutdown,brutal_kill},
                           {child_type,worker}]}]}}

[Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.1594.0>] Uncaught error in
HTTP request: {exit,
                                 {normal,
                                  {gen_server,call,
                                   [couch_query_servers,
                                    {ret_proc,
                                     {proc,<0.1726.0>,<<"javascript">>,
                                      {couch_os_process,prompt},
                                      {couch_os_process,set_timeout},
                                      {couch_os_process,stop}}}]}}}

[Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1594.0>] Stacktrace:
[{gen_server,call,2},
             {couch_query_servers,ret_os_process,1},
             {couch_query_servers,render_doc_show,6},
             {couch_httpd_show,'-send_doc_show_response/6-fun-0-',6},
             {couch_httpd_db,do_db_req,2},
             {couch_httpd,handle_request,5},
             {mochiweb_http,headers,5},
             {proc_lib,init_p_do_apply,3}]

[Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1594.0>] httpd 500 error
response:
 {"error":"normal","reason":"{gen_server,call,\n
[couch_query_servers,\n             {ret_proc,{proc,<0.1726.0>,<<
\"javascript\">>,\n
{couch_os_process,prompt},\n
{couch_os_process,set_timeout},\n
{couch_os_process,stop}}}]}"}


[Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1594.0>] 192.168.218.87 - -
'GET' /shows/_design/test/_show/summary/404 50



I am using CouchDB 0.10.0 from Ubuntu Karmic's repository. Any
assistance is much appreciated.


Regards,


Re: _show without docid returns 500 instead of 404

Posted by Jan Lehnardt <ja...@apache.org>.
On 13 Dec 2009, at 14:50, Markus Jelsma wrote:

> Hello,
> 
> 
> I've opened a ticket for this thread at:
> https://issues.apache.org/jira/browse/COUCHDB-598


Thanks Markus!

Cheers
Jan
--

> 
> 
> Markus
> 
> 
> Jan Lehnardt zei:
>> Hi,
>> 
>> great thread. Can you open a JIRA ticket so we don't lose track
>> of this?
>> 
>> https://issues.apache.org/jira/browse/COUCHDB
>> 
>> Cheers
>> Jan
>> --
>> 
>> On 1 Dec 2009, at 09:04, Markus Jelsma - Buyways B.V. wrote:
>> 
>>> Hello Chris,
>>> 
>>> 
>>> I'm glad you agree on my assumption that either the book or code is
>>> wrong and i'm glad something can be done about it.
>>> 
>>> Creating a custom 404 respone inside the show function seems
>>> inappropriate to me. Since show functions are without side-effects
>>> they cannot rely on other components in rendering a proper response so
>>> rendering a custom reusable error response is out of the question. And
>>> besides, a 404 Not Found is - in my opinion - exactly what we need and
>>> allows/forces for the caller to handle it properly.
>>> 
>>> In short, i concur. I would vote for the 404 reply and thus follow the
>>> instructions in the book.
>>> 
>>> 
>>> Regards,
>>> M.
>>> 
>>> 
>>> 
>>> On Tue, 2009-12-01 at 08:44 -0800, Chris Anderson wrote:
>>> 
>>> 
>>>> I think in this case the book is wrong (or maybe it is right and the
>>>> code is wrong). In the case of a missing doc the code currently
>>>> forces you to raise the 404 error from your show function.
>>>> 
>>>> I think this was done so that you have the option to render your own
>>>> 404 error message, instead of being stuck with CouchDB's JSON
>>>> message.
>>>> 
>>>> The arguments for the CouchDB handling 404 for you:
>>>> 
>>>> It's simpler to program because CouchDB handles some major error
>>>> handling for you (and properly)
>>>> It's more efficient b/c your JS function is not called in the case of
>>>> a missing docid.
>>>> 
>>>> The arguments for the current system (handle your own errors) pretty
>>>> much boil down to some increased flexibility. The flexibility of 404
>>>> messages might be better handled outside of show functions anyway.
>>>> 
>>>> I am leaning toward the description the book gives (which would mean
>>>> a code change). If you convince me it should be changed, I'll change
>>>> it. Is anyone relying on the ability of show functions to render
>>>> their own 404s?
>>>> 
>>>> The change would be simple, just remove a catch clause on
>>>> couch_httpd_show.erl line 81.
>>>> 
>>>> Chris
>>>> 
> 
> 
> 


Re: _show without docid returns 500 instead of 404

Posted by Markus Jelsma <ma...@buyways.nl>.
Hello,


I've opened a ticket for this thread at:
https://issues.apache.org/jira/browse/COUCHDB-598


Markus


Jan Lehnardt zei:
> Hi,
>
> great thread. Can you open a JIRA ticket so we don't lose track
> of this?
>
> https://issues.apache.org/jira/browse/COUCHDB
>
> Cheers
> Jan
> --
>
> On 1 Dec 2009, at 09:04, Markus Jelsma - Buyways B.V. wrote:
>
>> Hello Chris,
>>
>>
>> I'm glad you agree on my assumption that either the book or code is
>> wrong and i'm glad something can be done about it.
>>
>> Creating a custom 404 respone inside the show function seems
>> inappropriate to me. Since show functions are without side-effects
>> they cannot rely on other components in rendering a proper response so
>> rendering a custom reusable error response is out of the question. And
>> besides, a 404 Not Found is - in my opinion - exactly what we need and
>> allows/forces for the caller to handle it properly.
>>
>> In short, i concur. I would vote for the 404 reply and thus follow the
>> instructions in the book.
>>
>>
>> Regards,
>> M.
>>
>>
>>
>> On Tue, 2009-12-01 at 08:44 -0800, Chris Anderson wrote:
>>
>>
>>> I think in this case the book is wrong (or maybe it is right and the
>>> code is wrong). In the case of a missing doc the code currently
>>> forces you to raise the 404 error from your show function.
>>>
>>> I think this was done so that you have the option to render your own
>>> 404 error message, instead of being stuck with CouchDB's JSON
>>> message.
>>>
>>> The arguments for the CouchDB handling 404 for you:
>>>
>>> It's simpler to program because CouchDB handles some major error
>>> handling for you (and properly)
>>> It's more efficient b/c your JS function is not called in the case of
>>> a missing docid.
>>>
>>> The arguments for the current system (handle your own errors) pretty
>>> much boil down to some increased flexibility. The flexibility of 404
>>> messages might be better handled outside of show functions anyway.
>>>
>>> I am leaning toward the description the book gives (which would mean
>>> a code change). If you convince me it should be changed, I'll change
>>> it. Is anyone relying on the ability of show functions to render
>>> their own 404s?
>>>
>>> The change would be simple, just remove a catch clause on
>>> couch_httpd_show.erl line 81.
>>>
>>> Chris
>>>




Re: _show without docid returns 500 instead of 404

Posted by Jan Lehnardt <ja...@apache.org>.
Hi,

great thread. Can you open a JIRA ticket so we don't lose track
of this?

https://issues.apache.org/jira/browse/COUCHDB

Cheers
Jan
--

On 1 Dec 2009, at 09:04, Markus Jelsma - Buyways B.V. wrote:

> Hello Chris,
> 
> 
> I'm glad you agree on my assumption that either the book or code is
> wrong and i'm glad something can be done about it.
> 
> Creating a custom 404 respone inside the show function seems
> inappropriate to me. Since show functions are without side-effects they
> cannot rely on other components in rendering a proper response so
> rendering a custom reusable error response is out of the question. And
> besides, a 404 Not Found is - in my opinion - exactly what we need and
> allows/forces for the caller to handle it properly.
> 
> In short, i concur. I would vote for the 404 reply and thus follow the
> instructions in the book.
> 
> 
> Regards,
> M.
> 
> 
> 
> On Tue, 2009-12-01 at 08:44 -0800, Chris Anderson wrote:
> 
> 
>> I think in this case the book is wrong (or maybe it is right and the
>> code is wrong). In the case of a missing doc the code currently forces
>> you to raise the 404 error from your show function.
>> 
>> I think this was done so that you have the option to render your own
>> 404 error message, instead of being stuck with CouchDB's JSON message.
>> 
>> The arguments for the CouchDB handling 404 for you:
>> 
>> It's simpler to program because CouchDB handles some major error
>> handling for you (and properly)
>> It's more efficient b/c your JS function is not called in the case of
>> a missing docid.
>> 
>> The arguments for the current system (handle your own errors) pretty
>> much boil down to some increased flexibility. The flexibility of 404
>> messages might be better handled outside of show functions anyway.
>> 
>> I am leaning toward the description the book gives (which would mean a
>> code change). If you convince me it should be changed, I'll change it.
>> Is anyone relying on the ability of show functions to render their own
>> 404s?
>> 
>> The change would be simple, just remove a catch clause on
>> couch_httpd_show.erl line 81.
>> 
>> Chris
>> 


Re: _show without docid returns 500 instead of 404

Posted by "Markus Jelsma - Buyways B.V." <ma...@buyways.nl>.
Hello Chris,


I'm glad you agree on my assumption that either the book or code is
wrong and i'm glad something can be done about it.

Creating a custom 404 respone inside the show function seems
inappropriate to me. Since show functions are without side-effects they
cannot rely on other components in rendering a proper response so
rendering a custom reusable error response is out of the question. And
besides, a 404 Not Found is - in my opinion - exactly what we need and
allows/forces for the caller to handle it properly.

In short, i concur. I would vote for the 404 reply and thus follow the
instructions in the book.


Regards,
M.



On Tue, 2009-12-01 at 08:44 -0800, Chris Anderson wrote:


> I think in this case the book is wrong (or maybe it is right and the
> code is wrong). In the case of a missing doc the code currently forces
> you to raise the 404 error from your show function.
> 
> I think this was done so that you have the option to render your own
> 404 error message, instead of being stuck with CouchDB's JSON message.
> 
> The arguments for the CouchDB handling 404 for you:
> 
> It's simpler to program because CouchDB handles some major error
> handling for you (and properly)
> It's more efficient b/c your JS function is not called in the case of
> a missing docid.
> 
> The arguments for the current system (handle your own errors) pretty
> much boil down to some increased flexibility. The flexibility of 404
> messages might be better handled outside of show functions anyway.
> 
> I am leaning toward the description the book gives (which would mean a
> code change). If you convince me it should be changed, I'll change it.
> Is anyone relying on the ability of show functions to render their own
> 404s?
> 
> The change would be simple, just remove a catch clause on
> couch_httpd_show.erl line 81.
> 
> Chris
> 

Re: _show without docid returns 500 instead of 404

Posted by Chris Anderson <jc...@apache.org>.
On Tue, Dec 1, 2009 at 3:51 AM, Markus Jelsma - Buyways B.V.
<ma...@buyways.nl> wrote:
> Hello Patrick,
>
>
> I agree that operating on a null as if it were a proper document should
> raise an error.  But then i believe the book should not write "If the
> document with id 72d43a93eb74b5f2 does not exist, the request will
> result in an HTTP 404 Not Found error response." in the paragraph
> previous to the one you mention, is it not?

I think in this case the book is wrong (or maybe it is right and the
code is wrong). In the case of a missing doc the code currently forces
you to raise the 404 error from your show function.

I think this was done so that you have the option to render your own
404 error message, instead of being stuck with CouchDB's JSON message.

The arguments for the CouchDB handling 404 for you:

It's simpler to program because CouchDB handles some major error
handling for you (and properly)
It's more efficient b/c your JS function is not called in the case of
a missing docid.

The arguments for the current system (handle your own errors) pretty
much boil down to some increased flexibility. The flexibility of 404
messages might be better handled outside of show functions anyway.

I am leaning toward the description the book gives (which would mean a
code change). If you convince me it should be changed, I'll change it.
Is anyone relying on the ability of show functions to render their own
404s?

The change would be simple, just remove a catch clause on
couch_httpd_show.erl line 81.

Chris

-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Re: _show without docid returns 500 instead of 404

Posted by "Markus Jelsma - Buyways B.V." <ma...@buyways.nl>.
Hello Patrick,



I have already tested your assumption on passing a non-existing key (as
can be seen below) and either the written intention or the actual
behaviour of CouchDB is faulty. For clarity i hereby include the (same)
result for not passing a key:


http://zealand:5984/shows/_design/test/_show/summary/bd108c433aedaa1bd2def0ec85e59a0d
show with existing document ID gives:
- http 200 + proper body


http://zealand:5984/shows/_design/test/_show/summary/
show with no passed document ID gives:
- http 500 + {"error":"normal","reason":"{gen_server,call,\n
[couch_query_servers,\n             {ret_proc,{proc,<0.9297.0>,<<
\"javascript\">>,\n
{couch_os_process,prompt},\n
{couch_os_process,set_timeout},\n
{couch_os_process,stop}}}]}"}


http://zealand:5984/shows/_design/test/_show/summary/key_that_doesnt_exist
show with non-existing key gives:
- http 500 + {"error":"normal","reason":"{gen_server,call,\n
[couch_query_servers,\n             {ret_proc,{proc,<0.9366.0>,<<
\"javascript\">>,\n
{couch_os_process,prompt},\n
{couch_os_process,set_timeout},\n
{couch_os_process,stop}}}]}"}



For both HTTP 500's the lines written in the log are the same (as can be
seen below).



Regards,


On Tue, 2009-12-01 at 23:25 +1100, Patrick Barnes wrote:

> I suspect the intention of the authors is:
> - calling the show function with no id will result in a null doc being 
> passed to the function.
> - calling the show function with an id that doesn't belong to any 
> document will result in a 404 error.
> 
> I haven't worked with show functions myself, but a little testing should 
> probably confirm the above.
> 
> Cheers,
> -Patrick
> 
> 
> Markus Jelsma - Buyways B.V. wrote:
> > Hello Patrick, 
> > 
> > 
> > I agree that operating on a null as if it were a proper document should
> > raise an error.  But then i believe the book should not write "If the
> > document with id 72d43a93eb74b5f2 does not exist, the request will
> > result in an HTTP 404 Not Found error response." in the paragraph
> > previous to the one you mention, is it not?
> > 
> > Must i, therefore, always manually test on existance of a document as if
> > i were writing a map function?
> > 
> > 
> > Thanks for your reply.
> > 
> > 
> > On Tue, 2009-12-01 at 22:39 +1100, Patrick Barnes wrote:
> > 
> >> Hi Markus,
> >>
> >> When you get a 500 error, it is typically because one of your javascript 
> >> functions has had a run-time error.
> >>
> >> In your error log, see: "JavaScript function raised error: TypeError: 
> >> doc is null"
> >>
> >> You can't assume that doc is always a document - As the book states in a 
> >> following paragraph, show functions can be called without any id, and 
> >> the show function is then called with doc being null.
> >>
> >> -Patrick
> >>
> >>
> >> Markus Jelsma - Buyways B.V. wrote:
> >>> Dear list,
> >>>
> >>>
> >>> According to
> >>> http://books.couchdb.org/relax/design-documents/shows#Querying%20Show%
> >>> 20Functions i should receive an HTTP 404 Not Found response, instead i
> >>> get a HTTP 500 Internal Server Error. I am unsure as of yet whether i am
> >>> doing something wrong or if i should file a bug report for this one.
> >>>
> >>> Here are my two documents in my test database named shows:
> >>>
> >>> {
> >>>    "_id": "_design/test",
> >>>    "_rev": "1-21a6d69070ae4bec3e9f14fbb7f93201",
> >>>    "shows": {
> >>>        "summary": "function (doc, req) { return '<h1>'+doc.title+'</h1><p>'+doc.body+'</p>'; } "
> >>>    }
> >>> }
> >>>
> >>> and
> >>>
> >>> {
> >>>
> >>>    "_id": "bd108c433aedaa1bd2def0ec85e59a0d",
> >>>    "_rev": "3-5a031adf97aabe4888b9bfb94ba28d13",
> >>>    "title": "title",
> >>>    "body": "body text"
> >>> }
> >>>
> >>>
> >>> I receive proper results using the following HTTP GET request
> >>> http://zealand:5984/shows/_design/test/_show/summary/bd108c433aedaa1bd2def0ec85e59a0d
> >>> - code : 200
> >>> - body : <h1>title</h1><p>body text</p>
> >>>
> >>> Now consider querying the same show function with a non-existing
> >>> document id 
> >>> http://zealand:5984/shows/_design/test/_show/summary/404
> >>> - code 500
> >>> - body {"error":"normal","reason":"{gen_server,call,\n
> >>> [couch_query_servers,\n             {ret_proc,{proc,<0.1481.0>,<<
> >>> \"javascript\">>,\n
> >>> {couch_os_process,prompt},\n
> >>> {couch_os_process,set_timeout},\n
> >>> {couch_os_process,stop}}}]}"}
> >>>
> >>>
> >>>
> >>> Here is the output in the couch.log file:
> >>>
> >>> [Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1594.0>] OAuth Params: []
> >>>
> >>> [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1726.0>] OS Process ::
> >>> function raised error: TypeError: doc is null
> >>>
> >>> [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1726.0>] OS Process ::
> >>> stacktrace: (null,[object Object])@:0
> >>> runShow(function (doc, req) {return "<h1>" + doc.title + "</h1><p>" +
> >>> doc.body + "</p>";},null,[object Object],"function (doc, req) { return
> >>> '<h1>'+doc.title+'</h1><p>'+doc.body+'</p>'; }
> >>> ")@/usr/share/couchdb/server/main.js:388
> >>> ("function (doc, req) { return '<h1>'+doc.title+'</h1><p>'+doc.body
> >>> +'</p>'; } ",null,[object Object])@/usr/share/couchdb/server/main.js:358
> >>> @/usr/share/couchdb/server/main.js:842
> >>>
> >>>
> >>> [Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.1594.0>] OS Process Error ::
> >>> {render_error,{[{<<"body">>,
> >>>                                      <<"<html><body><h1>Render
> >>> Error</h1><p>JavaScript function raised error: TypeError: doc is
> >>> null</p><h2>Stacktrace:</h2><code><pre>(null,[object Object])@:0
> >>> \nrunShow(function (doc, req) {return \"&lt;h1&gt;\" + doc.title +
> >>> \"&lt;/h1&gt;&lt;p&gt;\" + doc.body + \"&lt;/p&gt;\";},null,[object
> >>> Object],\"function (doc, req) { return '&lt;h1&gt;'+doc.title
> >>> +'&lt;/h1&gt;&lt;p&gt;'+doc.body+'&lt;/p&gt;'; }
> >>> \")@/usr/share/couchdb/server/main.js:388\n(\"function (doc, req)
> >>> { return '&lt;h1&gt;'+doc.title+'&lt;/h1&gt;&lt;p&gt;'+doc.body
> >>> +'&lt;/p&gt;'; } \",null,[object
> >>> Object])@/usr/share/couchdb/server/main.js:358
> >>> \n@/usr/share/couchdb/server/main.js:842\n</pre></code><h2>Function
> >>> source:</h2><code><pre>function (doc, req) { return
> >>> '&lt;h1&gt;'+doc.title+'&lt;/h1&gt;&lt;p&gt;'+doc.body+'&lt;/p&gt;'; }
> >>> </pre></code></body></html>">>}]}}
> >>>
> >>> [Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1628.0>] Unknown linked
> >>> process died: <0.1726.0> (reason: normal)
> >>>
> >>> [Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.53.0>]
> >>> {error_report,<0.24.0>,
> >>>               {<0.53.0>,supervisor_report,
> >>>                [{supervisor,{local,couch_secondary_services}},
> >>>                 {errorContext,child_terminated},
> >>>                 {reason,normal},
> >>>                 {offender,[{pid,<0.1628.0>},
> >>>                            {name,query_servers},
> >>>                            {mfa,{couch_query_servers,start_link,[]}},
> >>>                            {restart_type,permanent},
> >>>                            {shutdown,brutal_kill},
> >>>                            {child_type,worker}]}]}}
> >>>
> >>> [Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.1594.0>] Uncaught error in
> >>> HTTP request: {exit,
> >>>                                  {normal,
> >>>                                   {gen_server,call,
> >>>                                    [couch_query_servers,
> >>>                                     {ret_proc,
> >>>                                      {proc,<0.1726.0>,<<"javascript">>,
> >>>                                       {couch_os_process,prompt},
> >>>                                       {couch_os_process,set_timeout},
> >>>                                       {couch_os_process,stop}}}]}}}
> >>>
> >>> [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1594.0>] Stacktrace:
> >>> [{gen_server,call,2},
> >>>              {couch_query_servers,ret_os_process,1},
> >>>              {couch_query_servers,render_doc_show,6},
> >>>              {couch_httpd_show,'-send_doc_show_response/6-fun-0-',6},
> >>>              {couch_httpd_db,do_db_req,2},
> >>>              {couch_httpd,handle_request,5},
> >>>              {mochiweb_http,headers,5},
> >>>              {proc_lib,init_p_do_apply,3}]
> >>>
> >>> [Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1594.0>] httpd 500 error
> >>> response:
> >>>  {"error":"normal","reason":"{gen_server,call,\n
> >>> [couch_query_servers,\n             {ret_proc,{proc,<0.1726.0>,<<
> >>> \"javascript\">>,\n
> >>> {couch_os_process,prompt},\n
> >>> {couch_os_process,set_timeout},\n
> >>> {couch_os_process,stop}}}]}"}
> >>>
> >>>
> >>> [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1594.0>] 192.168.218.87 - -
> >>> 'GET' /shows/_design/test/_show/summary/404 50
> >>>
> >>>
> >>>
> >>> I am using CouchDB 0.10.0 from Ubuntu Karmic's repository. Any
> >>> assistance is much appreciated.
> >>>
> >>>
> >>> Regards,
> >>>
> >>>
> > 

Re: _show without docid returns 500 instead of 404

Posted by Patrick Barnes <mr...@gmail.com>.
I suspect the intention of the authors is:
- calling the show function with no id will result in a null doc being 
passed to the function.
- calling the show function with an id that doesn't belong to any 
document will result in a 404 error.

I haven't worked with show functions myself, but a little testing should 
probably confirm the above.

Cheers,
-Patrick


Markus Jelsma - Buyways B.V. wrote:
> Hello Patrick, 
> 
> 
> I agree that operating on a null as if it were a proper document should
> raise an error.  But then i believe the book should not write "If the
> document with id 72d43a93eb74b5f2 does not exist, the request will
> result in an HTTP 404 Not Found error response." in the paragraph
> previous to the one you mention, is it not?
> 
> Must i, therefore, always manually test on existance of a document as if
> i were writing a map function?
> 
> 
> Thanks for your reply.
> 
> 
> On Tue, 2009-12-01 at 22:39 +1100, Patrick Barnes wrote:
> 
>> Hi Markus,
>>
>> When you get a 500 error, it is typically because one of your javascript 
>> functions has had a run-time error.
>>
>> In your error log, see: "JavaScript function raised error: TypeError: 
>> doc is null"
>>
>> You can't assume that doc is always a document - As the book states in a 
>> following paragraph, show functions can be called without any id, and 
>> the show function is then called with doc being null.
>>
>> -Patrick
>>
>>
>> Markus Jelsma - Buyways B.V. wrote:
>>> Dear list,
>>>
>>>
>>> According to
>>> http://books.couchdb.org/relax/design-documents/shows#Querying%20Show%
>>> 20Functions i should receive an HTTP 404 Not Found response, instead i
>>> get a HTTP 500 Internal Server Error. I am unsure as of yet whether i am
>>> doing something wrong or if i should file a bug report for this one.
>>>
>>> Here are my two documents in my test database named shows:
>>>
>>> {
>>>    "_id": "_design/test",
>>>    "_rev": "1-21a6d69070ae4bec3e9f14fbb7f93201",
>>>    "shows": {
>>>        "summary": "function (doc, req) { return '<h1>'+doc.title+'</h1><p>'+doc.body+'</p>'; } "
>>>    }
>>> }
>>>
>>> and
>>>
>>> {
>>>
>>>    "_id": "bd108c433aedaa1bd2def0ec85e59a0d",
>>>    "_rev": "3-5a031adf97aabe4888b9bfb94ba28d13",
>>>    "title": "title",
>>>    "body": "body text"
>>> }
>>>
>>>
>>> I receive proper results using the following HTTP GET request
>>> http://zealand:5984/shows/_design/test/_show/summary/bd108c433aedaa1bd2def0ec85e59a0d
>>> - code : 200
>>> - body : <h1>title</h1><p>body text</p>
>>>
>>> Now consider querying the same show function with a non-existing
>>> document id 
>>> http://zealand:5984/shows/_design/test/_show/summary/404
>>> - code 500
>>> - body {"error":"normal","reason":"{gen_server,call,\n
>>> [couch_query_servers,\n             {ret_proc,{proc,<0.1481.0>,<<
>>> \"javascript\">>,\n
>>> {couch_os_process,prompt},\n
>>> {couch_os_process,set_timeout},\n
>>> {couch_os_process,stop}}}]}"}
>>>
>>>
>>>
>>> Here is the output in the couch.log file:
>>>
>>> [Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1594.0>] OAuth Params: []
>>>
>>> [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1726.0>] OS Process ::
>>> function raised error: TypeError: doc is null
>>>
>>> [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1726.0>] OS Process ::
>>> stacktrace: (null,[object Object])@:0
>>> runShow(function (doc, req) {return "<h1>" + doc.title + "</h1><p>" +
>>> doc.body + "</p>";},null,[object Object],"function (doc, req) { return
>>> '<h1>'+doc.title+'</h1><p>'+doc.body+'</p>'; }
>>> ")@/usr/share/couchdb/server/main.js:388
>>> ("function (doc, req) { return '<h1>'+doc.title+'</h1><p>'+doc.body
>>> +'</p>'; } ",null,[object Object])@/usr/share/couchdb/server/main.js:358
>>> @/usr/share/couchdb/server/main.js:842
>>>
>>>
>>> [Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.1594.0>] OS Process Error ::
>>> {render_error,{[{<<"body">>,
>>>                                      <<"<html><body><h1>Render
>>> Error</h1><p>JavaScript function raised error: TypeError: doc is
>>> null</p><h2>Stacktrace:</h2><code><pre>(null,[object Object])@:0
>>> \nrunShow(function (doc, req) {return \"&lt;h1&gt;\" + doc.title +
>>> \"&lt;/h1&gt;&lt;p&gt;\" + doc.body + \"&lt;/p&gt;\";},null,[object
>>> Object],\"function (doc, req) { return '&lt;h1&gt;'+doc.title
>>> +'&lt;/h1&gt;&lt;p&gt;'+doc.body+'&lt;/p&gt;'; }
>>> \")@/usr/share/couchdb/server/main.js:388\n(\"function (doc, req)
>>> { return '&lt;h1&gt;'+doc.title+'&lt;/h1&gt;&lt;p&gt;'+doc.body
>>> +'&lt;/p&gt;'; } \",null,[object
>>> Object])@/usr/share/couchdb/server/main.js:358
>>> \n@/usr/share/couchdb/server/main.js:842\n</pre></code><h2>Function
>>> source:</h2><code><pre>function (doc, req) { return
>>> '&lt;h1&gt;'+doc.title+'&lt;/h1&gt;&lt;p&gt;'+doc.body+'&lt;/p&gt;'; }
>>> </pre></code></body></html>">>}]}}
>>>
>>> [Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1628.0>] Unknown linked
>>> process died: <0.1726.0> (reason: normal)
>>>
>>> [Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.53.0>]
>>> {error_report,<0.24.0>,
>>>               {<0.53.0>,supervisor_report,
>>>                [{supervisor,{local,couch_secondary_services}},
>>>                 {errorContext,child_terminated},
>>>                 {reason,normal},
>>>                 {offender,[{pid,<0.1628.0>},
>>>                            {name,query_servers},
>>>                            {mfa,{couch_query_servers,start_link,[]}},
>>>                            {restart_type,permanent},
>>>                            {shutdown,brutal_kill},
>>>                            {child_type,worker}]}]}}
>>>
>>> [Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.1594.0>] Uncaught error in
>>> HTTP request: {exit,
>>>                                  {normal,
>>>                                   {gen_server,call,
>>>                                    [couch_query_servers,
>>>                                     {ret_proc,
>>>                                      {proc,<0.1726.0>,<<"javascript">>,
>>>                                       {couch_os_process,prompt},
>>>                                       {couch_os_process,set_timeout},
>>>                                       {couch_os_process,stop}}}]}}}
>>>
>>> [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1594.0>] Stacktrace:
>>> [{gen_server,call,2},
>>>              {couch_query_servers,ret_os_process,1},
>>>              {couch_query_servers,render_doc_show,6},
>>>              {couch_httpd_show,'-send_doc_show_response/6-fun-0-',6},
>>>              {couch_httpd_db,do_db_req,2},
>>>              {couch_httpd,handle_request,5},
>>>              {mochiweb_http,headers,5},
>>>              {proc_lib,init_p_do_apply,3}]
>>>
>>> [Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1594.0>] httpd 500 error
>>> response:
>>>  {"error":"normal","reason":"{gen_server,call,\n
>>> [couch_query_servers,\n             {ret_proc,{proc,<0.1726.0>,<<
>>> \"javascript\">>,\n
>>> {couch_os_process,prompt},\n
>>> {couch_os_process,set_timeout},\n
>>> {couch_os_process,stop}}}]}"}
>>>
>>>
>>> [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1594.0>] 192.168.218.87 - -
>>> 'GET' /shows/_design/test/_show/summary/404 50
>>>
>>>
>>>
>>> I am using CouchDB 0.10.0 from Ubuntu Karmic's repository. Any
>>> assistance is much appreciated.
>>>
>>>
>>> Regards,
>>>
>>>
> 

Re: _show without docid returns 500 instead of 404

Posted by "Markus Jelsma - Buyways B.V." <ma...@buyways.nl>.
Hello Patrick, 


I agree that operating on a null as if it were a proper document should
raise an error.  But then i believe the book should not write "If the
document with id 72d43a93eb74b5f2 does not exist, the request will
result in an HTTP 404 Not Found error response." in the paragraph
previous to the one you mention, is it not?

Must i, therefore, always manually test on existance of a document as if
i were writing a map function?


Thanks for your reply.


On Tue, 2009-12-01 at 22:39 +1100, Patrick Barnes wrote:

> Hi Markus,
> 
> When you get a 500 error, it is typically because one of your javascript 
> functions has had a run-time error.
> 
> In your error log, see: "JavaScript function raised error: TypeError: 
> doc is null"
> 
> You can't assume that doc is always a document - As the book states in a 
> following paragraph, show functions can be called without any id, and 
> the show function is then called with doc being null.
> 
> -Patrick
> 
> 
> Markus Jelsma - Buyways B.V. wrote:
> > Dear list,
> > 
> > 
> > According to
> > http://books.couchdb.org/relax/design-documents/shows#Querying%20Show%
> > 20Functions i should receive an HTTP 404 Not Found response, instead i
> > get a HTTP 500 Internal Server Error. I am unsure as of yet whether i am
> > doing something wrong or if i should file a bug report for this one.
> > 
> > Here are my two documents in my test database named shows:
> > 
> > {
> >    "_id": "_design/test",
> >    "_rev": "1-21a6d69070ae4bec3e9f14fbb7f93201",
> >    "shows": {
> >        "summary": "function (doc, req) { return '<h1>'+doc.title+'</h1><p>'+doc.body+'</p>'; } "
> >    }
> > }
> > 
> > and
> > 
> > {
> > 
> >    "_id": "bd108c433aedaa1bd2def0ec85e59a0d",
> >    "_rev": "3-5a031adf97aabe4888b9bfb94ba28d13",
> >    "title": "title",
> >    "body": "body text"
> > }
> > 
> > 
> > I receive proper results using the following HTTP GET request
> > http://zealand:5984/shows/_design/test/_show/summary/bd108c433aedaa1bd2def0ec85e59a0d
> > - code : 200
> > - body : <h1>title</h1><p>body text</p>
> > 
> > Now consider querying the same show function with a non-existing
> > document id 
> > http://zealand:5984/shows/_design/test/_show/summary/404
> > - code 500
> > - body {"error":"normal","reason":"{gen_server,call,\n
> > [couch_query_servers,\n             {ret_proc,{proc,<0.1481.0>,<<
> > \"javascript\">>,\n
> > {couch_os_process,prompt},\n
> > {couch_os_process,set_timeout},\n
> > {couch_os_process,stop}}}]}"}
> > 
> > 
> > 
> > Here is the output in the couch.log file:
> > 
> > [Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1594.0>] OAuth Params: []
> > 
> > [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1726.0>] OS Process ::
> > function raised error: TypeError: doc is null
> > 
> > [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1726.0>] OS Process ::
> > stacktrace: (null,[object Object])@:0
> > runShow(function (doc, req) {return "<h1>" + doc.title + "</h1><p>" +
> > doc.body + "</p>";},null,[object Object],"function (doc, req) { return
> > '<h1>'+doc.title+'</h1><p>'+doc.body+'</p>'; }
> > ")@/usr/share/couchdb/server/main.js:388
> > ("function (doc, req) { return '<h1>'+doc.title+'</h1><p>'+doc.body
> > +'</p>'; } ",null,[object Object])@/usr/share/couchdb/server/main.js:358
> > @/usr/share/couchdb/server/main.js:842
> > 
> > 
> > [Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.1594.0>] OS Process Error ::
> > {render_error,{[{<<"body">>,
> >                                      <<"<html><body><h1>Render
> > Error</h1><p>JavaScript function raised error: TypeError: doc is
> > null</p><h2>Stacktrace:</h2><code><pre>(null,[object Object])@:0
> > \nrunShow(function (doc, req) {return \"&lt;h1&gt;\" + doc.title +
> > \"&lt;/h1&gt;&lt;p&gt;\" + doc.body + \"&lt;/p&gt;\";},null,[object
> > Object],\"function (doc, req) { return '&lt;h1&gt;'+doc.title
> > +'&lt;/h1&gt;&lt;p&gt;'+doc.body+'&lt;/p&gt;'; }
> > \")@/usr/share/couchdb/server/main.js:388\n(\"function (doc, req)
> > { return '&lt;h1&gt;'+doc.title+'&lt;/h1&gt;&lt;p&gt;'+doc.body
> > +'&lt;/p&gt;'; } \",null,[object
> > Object])@/usr/share/couchdb/server/main.js:358
> > \n@/usr/share/couchdb/server/main.js:842\n</pre></code><h2>Function
> > source:</h2><code><pre>function (doc, req) { return
> > '&lt;h1&gt;'+doc.title+'&lt;/h1&gt;&lt;p&gt;'+doc.body+'&lt;/p&gt;'; }
> > </pre></code></body></html>">>}]}}
> > 
> > [Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1628.0>] Unknown linked
> > process died: <0.1726.0> (reason: normal)
> > 
> > [Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.53.0>]
> > {error_report,<0.24.0>,
> >               {<0.53.0>,supervisor_report,
> >                [{supervisor,{local,couch_secondary_services}},
> >                 {errorContext,child_terminated},
> >                 {reason,normal},
> >                 {offender,[{pid,<0.1628.0>},
> >                            {name,query_servers},
> >                            {mfa,{couch_query_servers,start_link,[]}},
> >                            {restart_type,permanent},
> >                            {shutdown,brutal_kill},
> >                            {child_type,worker}]}]}}
> > 
> > [Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.1594.0>] Uncaught error in
> > HTTP request: {exit,
> >                                  {normal,
> >                                   {gen_server,call,
> >                                    [couch_query_servers,
> >                                     {ret_proc,
> >                                      {proc,<0.1726.0>,<<"javascript">>,
> >                                       {couch_os_process,prompt},
> >                                       {couch_os_process,set_timeout},
> >                                       {couch_os_process,stop}}}]}}}
> > 
> > [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1594.0>] Stacktrace:
> > [{gen_server,call,2},
> >              {couch_query_servers,ret_os_process,1},
> >              {couch_query_servers,render_doc_show,6},
> >              {couch_httpd_show,'-send_doc_show_response/6-fun-0-',6},
> >              {couch_httpd_db,do_db_req,2},
> >              {couch_httpd,handle_request,5},
> >              {mochiweb_http,headers,5},
> >              {proc_lib,init_p_do_apply,3}]
> > 
> > [Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1594.0>] httpd 500 error
> > response:
> >  {"error":"normal","reason":"{gen_server,call,\n
> > [couch_query_servers,\n             {ret_proc,{proc,<0.1726.0>,<<
> > \"javascript\">>,\n
> > {couch_os_process,prompt},\n
> > {couch_os_process,set_timeout},\n
> > {couch_os_process,stop}}}]}"}
> > 
> > 
> > [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1594.0>] 192.168.218.87 - -
> > 'GET' /shows/_design/test/_show/summary/404 50
> > 
> > 
> > 
> > I am using CouchDB 0.10.0 from Ubuntu Karmic's repository. Any
> > assistance is much appreciated.
> > 
> > 
> > Regards,
> > 
> > 

Re: _show without docid returns 500 instead of 404

Posted by Patrick Barnes <mr...@gmail.com>.
Hi Markus,

When you get a 500 error, it is typically because one of your javascript 
functions has had a run-time error.

In your error log, see: "JavaScript function raised error: TypeError: 
doc is null"

You can't assume that doc is always a document - As the book states in a 
following paragraph, show functions can be called without any id, and 
the show function is then called with doc being null.

-Patrick


Markus Jelsma - Buyways B.V. wrote:
> Dear list,
> 
> 
> According to
> http://books.couchdb.org/relax/design-documents/shows#Querying%20Show%
> 20Functions i should receive an HTTP 404 Not Found response, instead i
> get a HTTP 500 Internal Server Error. I am unsure as of yet whether i am
> doing something wrong or if i should file a bug report for this one.
> 
> Here are my two documents in my test database named shows:
> 
> {
>    "_id": "_design/test",
>    "_rev": "1-21a6d69070ae4bec3e9f14fbb7f93201",
>    "shows": {
>        "summary": "function (doc, req) { return '<h1>'+doc.title+'</h1><p>'+doc.body+'</p>'; } "
>    }
> }
> 
> and
> 
> {
> 
>    "_id": "bd108c433aedaa1bd2def0ec85e59a0d",
>    "_rev": "3-5a031adf97aabe4888b9bfb94ba28d13",
>    "title": "title",
>    "body": "body text"
> }
> 
> 
> I receive proper results using the following HTTP GET request
> http://zealand:5984/shows/_design/test/_show/summary/bd108c433aedaa1bd2def0ec85e59a0d
> - code : 200
> - body : <h1>title</h1><p>body text</p>
> 
> Now consider querying the same show function with a non-existing
> document id 
> http://zealand:5984/shows/_design/test/_show/summary/404
> - code 500
> - body {"error":"normal","reason":"{gen_server,call,\n
> [couch_query_servers,\n             {ret_proc,{proc,<0.1481.0>,<<
> \"javascript\">>,\n
> {couch_os_process,prompt},\n
> {couch_os_process,set_timeout},\n
> {couch_os_process,stop}}}]}"}
> 
> 
> 
> Here is the output in the couch.log file:
> 
> [Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1594.0>] OAuth Params: []
> 
> [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1726.0>] OS Process ::
> function raised error: TypeError: doc is null
> 
> [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1726.0>] OS Process ::
> stacktrace: (null,[object Object])@:0
> runShow(function (doc, req) {return "<h1>" + doc.title + "</h1><p>" +
> doc.body + "</p>";},null,[object Object],"function (doc, req) { return
> '<h1>'+doc.title+'</h1><p>'+doc.body+'</p>'; }
> ")@/usr/share/couchdb/server/main.js:388
> ("function (doc, req) { return '<h1>'+doc.title+'</h1><p>'+doc.body
> +'</p>'; } ",null,[object Object])@/usr/share/couchdb/server/main.js:358
> @/usr/share/couchdb/server/main.js:842
> 
> 
> [Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.1594.0>] OS Process Error ::
> {render_error,{[{<<"body">>,
>                                      <<"<html><body><h1>Render
> Error</h1><p>JavaScript function raised error: TypeError: doc is
> null</p><h2>Stacktrace:</h2><code><pre>(null,[object Object])@:0
> \nrunShow(function (doc, req) {return \"&lt;h1&gt;\" + doc.title +
> \"&lt;/h1&gt;&lt;p&gt;\" + doc.body + \"&lt;/p&gt;\";},null,[object
> Object],\"function (doc, req) { return '&lt;h1&gt;'+doc.title
> +'&lt;/h1&gt;&lt;p&gt;'+doc.body+'&lt;/p&gt;'; }
> \")@/usr/share/couchdb/server/main.js:388\n(\"function (doc, req)
> { return '&lt;h1&gt;'+doc.title+'&lt;/h1&gt;&lt;p&gt;'+doc.body
> +'&lt;/p&gt;'; } \",null,[object
> Object])@/usr/share/couchdb/server/main.js:358
> \n@/usr/share/couchdb/server/main.js:842\n</pre></code><h2>Function
> source:</h2><code><pre>function (doc, req) { return
> '&lt;h1&gt;'+doc.title+'&lt;/h1&gt;&lt;p&gt;'+doc.body+'&lt;/p&gt;'; }
> </pre></code></body></html>">>}]}}
> 
> [Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1628.0>] Unknown linked
> process died: <0.1726.0> (reason: normal)
> 
> [Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.53.0>]
> {error_report,<0.24.0>,
>               {<0.53.0>,supervisor_report,
>                [{supervisor,{local,couch_secondary_services}},
>                 {errorContext,child_terminated},
>                 {reason,normal},
>                 {offender,[{pid,<0.1628.0>},
>                            {name,query_servers},
>                            {mfa,{couch_query_servers,start_link,[]}},
>                            {restart_type,permanent},
>                            {shutdown,brutal_kill},
>                            {child_type,worker}]}]}}
> 
> [Tue, 01 Dec 2009 10:31:37 GMT] [error] [<0.1594.0>] Uncaught error in
> HTTP request: {exit,
>                                  {normal,
>                                   {gen_server,call,
>                                    [couch_query_servers,
>                                     {ret_proc,
>                                      {proc,<0.1726.0>,<<"javascript">>,
>                                       {couch_os_process,prompt},
>                                       {couch_os_process,set_timeout},
>                                       {couch_os_process,stop}}}]}}}
> 
> [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1594.0>] Stacktrace:
> [{gen_server,call,2},
>              {couch_query_servers,ret_os_process,1},
>              {couch_query_servers,render_doc_show,6},
>              {couch_httpd_show,'-send_doc_show_response/6-fun-0-',6},
>              {couch_httpd_db,do_db_req,2},
>              {couch_httpd,handle_request,5},
>              {mochiweb_http,headers,5},
>              {proc_lib,init_p_do_apply,3}]
> 
> [Tue, 01 Dec 2009 10:31:37 GMT] [debug] [<0.1594.0>] httpd 500 error
> response:
>  {"error":"normal","reason":"{gen_server,call,\n
> [couch_query_servers,\n             {ret_proc,{proc,<0.1726.0>,<<
> \"javascript\">>,\n
> {couch_os_process,prompt},\n
> {couch_os_process,set_timeout},\n
> {couch_os_process,stop}}}]}"}
> 
> 
> [Tue, 01 Dec 2009 10:31:37 GMT] [info] [<0.1594.0>] 192.168.218.87 - -
> 'GET' /shows/_design/test/_show/summary/404 50
> 
> 
> 
> I am using CouchDB 0.10.0 from Ubuntu Karmic's repository. Any
> assistance is much appreciated.
> 
> 
> Regards,
> 
>