Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[couchdb/engine] fire sync callback on db error

  • Loading branch information...
commit a3949d639facf290eca5b89e02298806ef8c2926 1 parent 21b9ae3
@indutny indutny authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/resourceful/engines/couchdb/engine.js
View
8 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
Please sign in to comment.
Something went wrong with that request. Please try again.