benoitc / benoitc/couchdbkit

BulkSaveError throws empty message.

Open
#137 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
263
Forks
90
PR merge metrics
No merged PRs in 30d

Description

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'}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the db.bulk_save entry point and the BulkSaveError handling described in the issue. Reproduce the duplicate-document case with docB listed twice, inspect the CouchDB response containing the conflict reason, and verify that the raised error exposes that response rather than an empty message.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.