Skip to content

Commit

Permalink
[couchdb/engine] fire sync callback on db error
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny committed Oct 4, 2011
1 parent 21b9ae3 commit a3949d6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/resourceful/engines/couchdb/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,12 @@ Connection.prototype.sync = function (factory, callback) {
that.connection.connection.create(function () {
that.sync(callback);
});
}
} else {

/* TODO: Catch errors here. Needs a rewrite, because of the race */
/* condition, when the design doc is trying to be written in parallel */
/* TODO: Catch errors here. Needs a rewrite, because of the race */
/* condition, when the design doc is trying to be written in parallel */
callback(e);
}
}
else {
// We might not need to wait for the document to be
Expand Down

0 comments on commit a3949d6

Please sign in to comment.