Details
-
Task
-
Resolution: Unresolved
-
Major - P3
-
None
-
3.4.0
-
None
Description
Using mongocxx::bulk_write::append() with a document that fails internal validation (e.g. using $ in field names) throws a mongocxx::logic_error exception.
This exception, however, belongs to the server_error_category, which seems weird since it is a client (driver) generated error in libmongoc.
How are users supposed to differentiate std::system_error exceptions if they want to know if the error originated in the server or client? Also, not exposing the libmongoc error domain (e.g. as std::error_condition) makes it really hard to take actions depending on the type of the error.
How are clients of mongo-cxx-driver code supposed to handle this?
Attachments
Issue Links
- is related to
-
CXX-2494 Improved Bulk Write API
-
- Blocked
-