Skip to content
Browse files

added more info to error msg from addAttachmentToDoc

  • Loading branch information...
1 parent 59f06a1 commit 54dd281910e60753c6aefd2f77380f87505df685 Nathan committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/couchdb/database.js
View
6 lib/couchdb/database.js
@@ -379,8 +379,10 @@ var Database = {
}
doc._rev = data.rev;
},
- error: function(xhr) {
- throw new Error("Failed to add attachment: " + xhr.status);
+ error: function(xhr, textStatus, errorThrown) {
+ textStatus = textStatus || "";
+ errorThrown = errorThrown || "";
+ throw new Error("Failed to add attachment: " + xhr.status + " " + textStatus + " " + errorThrown);
}
});

0 comments on commit 54dd281

Please sign in to comment.
Something went wrong with that request. Please try again.