Preserve the original value of the reason value from the response array in the json returned from _bulk_docs. This can be queried through getReason()
This allows users to retrieve the message from failed validation functions, etc.
Note that the overall HTTP status code is still preserved in each result document and can be queried through getStatusCode(). It is therefore the same across all result documents. It should not be relied upon to detect failure:
"The return code from a successful bulk insertion is 201. The content of the returned structure indicates success or other information messages on a per-document basis." (from the IBM Cloudant documentation).
What
Preserve the original value of the
reason
value from the response array in the json returned from_bulk_docs
. This can be queried throughgetReason()
This allows users to retrieve the message from failed validation functions, etc.
Note that the overall HTTP status code is still preserved in each result document and can be queried through
getStatusCode()
. It is therefore the same across all result documents. It should not be relied upon to detect failure:"The return code from a successful bulk insertion is 201. The content of the returned structure indicates success or other information messages on a per-document basis." (from the IBM Cloudant documentation).
Testing
New test
bulkRejectedByValidation
Issues
See #428