Details
-
Improvement
-
Resolution: Done
-
Major
-
None
-
1.0.0-dp.6
-
None
-
1
-
SDK20
Description
In order to help with user experience, it would probably be better to set the connect_string error property when an invalid connection string value is encountered. See JSCBC-1156 linked for an example of user providing an invalid tls_verify_mode option. It will still be up to the wrappers to check for the error and raise the appropriate exception, but when at least the Node.js and Python wrappers use the couchbase::core::utils::parse_connection_string method, so would be nice to have the C++ client set errors during parsing.
Ref:
https://github.com/couchbaselabs/couchbase-cxx-client/blob/main/core/utils/connection_string.cxx
Proposed solution: The existing errors property should be left for errors that will terminate the parsing. Add a new warnings connection_string property for parsing issues like invalid options that do not need to terminate the parsing. All warnings should be accumulated there and the caller (wrapper or C++ Public API) can decide whether to log them or raise an exception.
Attachments
Issue Links
- blocks
-
JSCBC-1156 TLS error not thrown in exception for Nodejs SDK
- Open