Created
December 6, 2012 22:12
-
-
Save kdawes/4228968 to your computer and use it in GitHub Desktop.
cradle / JSON.stringify / typeError
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stack: 'TypeError: Converting circular structure to JSON\n | |
at Object.stringify (native)\n | |
at Connection.cradle.Connection.request (/tmp/winston-couchdb/node_modules/cradle/lib/cradle.js:182:29)\n JSON.stringify ( blammo :( ) | |
atDatabase.query (/tmp/winston-couchdb/node_modules/cradle/lib/cradle/database/index.js:15:21)\n Database.prototype.query -> this.connection.request( options, callback ) | |
at Database.post (/tmp/winston-couchdb/node_modules/cradle/lib/cradle/database/documents.js:71:10)\n Database.prototype.post | |
at Database._save (/tmp/winston-couchdb/node_modules/cradle/lib/cradle/database/documents.js:150:18)\n POST | |
at Database.save (/tmp/winston-couchdb/node_modules/cradle/lib/cradle/database/documents.js:92:10)\n _save | |
at Couchdb.log (/tmp/winston-couchdb/lib/winston-couchdb.js:91:15)\n | |
at Object.helpers.testLevels.circmetadatatest.topic (/tmp/winston-couchdb/node_modules/winston/test/helpers.js:165:17)\n | |
at run (/usr/local/lib/node_modules/vows/lib/vows/suite.js:134:35)\n | |
at EventEmitter.Suite.runBatch.callback (/usr/local/lib/node_modules/vows/lib/vows/suite.js:234:40)', | |
type: 'circular_structure', arguments: [], message: 'Converting circular structure to JSON' } // cradle.js:182 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
solution : import cycle
in winston-couchdb.js, change :
var params = meta || {}; to
var params = cycle.decycle(meta) || {};