CONN-587 try-catch instead of if-else