-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.0
-
Component/s: None
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?
- is related to
-
CXX-2377 C++ Error Improvements
- Backlog