fix(connection): capture the tls on error