couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Travis Paul <>
Subject Strange JavaScript behavior in validate_doc_update functions
Date Thu, 03 Jan 2013 00:21:24 GMT
In one of my validate_doc_update functions I try to throw an array of
errors like so:

    if (report.errors.length) {
       throw({forbidden: report.errors});

and couchdb crashes (but recovers of course)

If I stringify the errors array, it works fine...

    if (report.errors.length) {
       throw({forbidden: JSON.stringify(report.errors)});

report.errors looks like:
and the crash report:

I'm running couchdb 1.0.3 and I was using Futon to save the document and
erica to push the couchapp. I am using JSV to get the errors array.

I would be happy to put my couchapp somewhere (github) if it will help find
the cause. I am just trying to use json-schema in a demo couchapp.

Any insight would be appreciated.

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