Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

TypeError: Cannot read property 'body' of undefined #11

Merged
merged 1 commit into from

2 participants

@mborho

When couchdb gets stopped, this exception gets raised, which prevents reconnection when couchdb is up again

TypeError: Cannot read property 'body' of undefined
at Request.on_feed_response as onResponse
at Request. (/home/node/local/node-0.6.6/lib/node_modules/cradle/node_modules/follow/node_modules/request/main.js:186:60)
at Request.emit (events.js:67:17)
at ClientRequest. (/home/node/local/node-0.6.6/lib/node_modules/cradle/node_modules/follow/node_modules/request/main.js:184:10)
at ClientRequest.emit (events.js:67:17)
at Socket. (http.js:1114:11)
at Socket.emit (events.js:67:17)
at Array.0 (net.js:313:25)
at EventEmitter._tickCallback (node.js:192:40)

@jhs jhs merged commit 27def7c into iriscouch:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/feed.js
View
2  lib/feed.js
@@ -208,7 +208,7 @@ Feed.prototype.query = function query_feed() {
function on_feed_response(er, resp, body) {
clearTimeout(response_timer)
- if(resp.body || body)
+ if((resp !== undefined && resp.body) || body)
return self.die(new Error('Cannot handle a body in the feed response: ' + lib.JS(resp.body || body)))
if(timed_out) {
Something went wrong with that request. Please try again.