I did think of that and in fact I had it narrowed down to specific exception, but it turns out that the server side potentially throws all kinds of exceptions (some due to bugs like https://issues.jboss.org/browse/WFLY-1306) and some due to the fact that the session creation APIs don't have a specific exception type. So for now, I decided that sticking to all kinds of Exception should be fine and since this part is internal implementation detail in a intentionally private method, we can always narrow it down to a specific exception type, when we have done the necessary changes on the server side.

As for the drawback of this broad Exception clause, they are practically minimal (although not zero) where a particular node fails due to a non-retryable exception and the other nodes cannot handle it or there are too many other node that are eligible and retrying on each of them becomes time consuming.