You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2021/09/24 14:49:07 UTC

[GitHub] [tinkerpop] divijvaidya commented on a change in pull request #1479: TINKERPOP-2616: Provide better exceptions with SSL related failures

divijvaidya commented on a change in pull request #1479:
URL: https://github.com/apache/tinkerpop/pull/1479#discussion_r715678825



##########
File path: gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
##########
@@ -124,8 +126,8 @@ public Client alias(final Map<String, String> aliases) {
     public ResultSet submit(final Traversal traversal) {
         try {
             return submitAsync(traversal).get();
-        } catch (UnsupportedOperationException uoe) {
-            throw uoe;
+        } catch (RuntimeException re) {

Review comment:
       Thank you for these changes.
   
   1. The top level exception thrown back to the application has changed here from `RuntimeException` to `NoHostAvailableException`. If a user has application level code that is catching the `RuntimeException` and checking the cause as `NoHostAvailableException`, that code will fail with client upgrade. Hence, this is a backward incompatible change since it modifies the exception contract.
   For 3.4.x, could we please keep the contract as same (i.e. by wrapping NoHostAvailableException in RuntimeException)?
   
   2. All other changes in nested exceptions look good (we can still have `NoHostAvailableException` with a nice cause).
   
   3. I would vote that we can take this break in exception contract for 3.5.x series since that is still going through some stabilization with respect to other behaviours as well such as null semantics. @spmallette agree?
   
   Overall, I think we do the following:
   1. Merge this to master.
   2. Create a different version with NoHostAvailableException as a 1st level cause to merge into 3.4 branch.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org