Permalink
Browse files

added more info to error msg from addAttachmentToDoc

  • Loading branch information...
Nathan Nathan
Nathan authored and Nathan committed Nov 12, 2009
1 parent 59f06a1 commit 54dd281910e60753c6aefd2f77380f87505df685
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/couchdb/database.js
View
@@ -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.