Permalink
Browse files

[couchdb/engine] fire sync callback on db error

  • Loading branch information...
indutny committed Oct 4, 2011
1 parent 21b9ae3 commit a3949d639facf290eca5b89e02298806ef8c2926
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/resourceful/engines/couchdb/engine.js
@@ -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

0 comments on commit a3949d6

Please sign in to comment.