I reorganised it on one page for the moment and put in the table of
contents. Are there error numbers or error codes that could be used as
the anchor references?
http://wiki.apache.org/couchdb/Error_messages#functionraisedexceptionCannotencodeundefinedvalueasJSON
Jan Lehnardt wrote:
Hi Alan,
I think:
1) the wiki page that now lists install & runtime errors should be
split up in separate install & runtime error pages.
2) the pages should get an index like
http://wiki.apache.org/couchdb/Frequently_asked_questions that adds
#anchors for direct links.
Anybody wants to tackle this? Be our hero!
Cheers
Jan
--
On 30 Dec 2008, at 12:17, Alan Bell wrote:
OK, so Jan's full reply there was a near-perfect error message.
Informative, useful and a proper explanation. So how do we get
"Cannot encode 'undefined' value as JSON" to include a link to a wiki
page with Jan's reply on it?
Alan.
Jan Lehnardt wrote:
On 30 Dec 2008, at 10:07, paul jobs wrote:
http://rafb.net/p/oz8VfH95.html
[Tue, 30 Dec 2008 09:04:46 GMT] [info] [<0.134.0>] OS Process Log
Message:
function raised exception (Cannot encode 'undefined' value as JSON)
with
doc._id bef1111175e1d5052e9c49db546b39db
Your Javascript is using an object member that is not defined. E.g.:
{
"_id":"XYZ123",
"_rev":"1BB2BB",
"field":"value"
}
map: function(doc) {
emit(doc.name, doc.address);
}
instead, try this:
map: function(doc) {
if(doc.name && doc.address) {
emit(doc.name, doc.address);
}
}
Cheers,
Jan