Connection creation may invole SDK layer exception throwing, we wrap this exception handling into a utility function.