Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BulkSaveError throws empty message. #137

Open
wendall911 opened this issue May 30, 2012 · 1 comment
Open

BulkSaveError throws empty message. #137

wendall911 opened this issue May 30, 2012 · 1 comment

Comments

@wendall911
Copy link
Contributor

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
Copy link
Owner

benoitc commented Jun 6, 2012

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants