BulkSaveError throws empty message.
Opened this issue · 1 comments
wendall911 commented
Using bulk save, with a list containing the same document twice, BulkSaveError is properly thrown, but error is empty.
try:
db.bulk_save([docA, docB, docB])
except BulkSaveError, e:
# e is empty
CouchDB will return 201. First instance of docB is good in the response, second instance will contain:
{'reason': 'Document update conflict.', 'id': 'docid', 'error': 'conflict'}
benoitc commented
hmmm I can't reproduce it here :
>>> try:
... res = db.save_docs([a, b, b])
... except BulkSaveError, e:
... print e.errors
... print e.results
...
[{u'reason': u'Document update conflict.', u'id': u'afd34ce58d00ff9dd50c54807797ef7a', u'error': u'conflict'}]
[{u'rev': u'2-19dbe7fc82f45d29ac624c0a8c5b0e62', u'ok': True, u'id': u'afd34ce58d00ff9dd50c54807797fe77'}, {u'rev': u'2-672a156b4844da49e0294b6c90476351', u'ok': True, u'id': u'afd34ce58d00ff9dd50c54807797ef7a'}, {u'reason': u'Document update conflict.', u'id': u'afd34ce58d00ff9dd50c54807797ef7a', u'error': u'conflict'}]
What is the version of couchdb?