Permalink
Browse files

[couchdb/engine] fire sync callback on db error

  • Loading branch information...
1 parent 0ee8577 commit 59f912c621bc4696b2797bfb04b4175512c52f4e @indutny indutny committed Oct 4, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/resourceful/engines/couchdb/engine.js
@@ -179,10 +179,11 @@ 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 */
+ callback(e);
}
-
- /* TODO: Catch errors here. Needs a rewrite, because of the race */
- /* condition, when the design doc is trying to be written in parallel */
}
else {
// We might not need to wait for the document to be

0 comments on commit 59f912c

Please sign in to comment.